Setting Mac OS File Type & Creator

Chris Sheffield revlist at cableone.net
Mon Aug 15 15:31:34 EDT 2005


Could Rev have a problem with using a space in the type?  It  
shouldn't, but that's the only thing I can think of.  From what I can  
determine, pdf's do not have resource forks, so you shouldn't have to  
mess with resfile at all.  Although, to be totally sure, maybe you  
should try using "detailed files" and take a look to see if the files  
have resource data (item 3 will be the size of the resource fork.   
That might tell you something.

A couple things I found interesting:

1.  Using ResEdit on some PDF files on my machine I found that not  
all of them even have a file type and creator set.  They're both empty.

2.  Some of my PDF files have the creator set as prvw, which I'm  
assuming stands for the OS X app Preview.  And yet, they still open  
with Adobe Reader when I double-click them.  Maybe that's cause the  
file extension is associated with the app, and not the files' type  
and creator?

I have done what you're trying to do in the past and never had any  
problems.  That's why I wondered if it was the space in the file  
type.  I've never dealt with any spaces in file types before.

This is probably not very helpful, but I thought some of this  
information was kind of interesting.

Chris


On Aug 15, 2005, at 12:31 PM, Dan Shafer wrote:

> This ought to be duck soup. But it's turned into alligator stew  
> with a live alligator.
>
> I have a custom property set to a file. I want to write this file  
> out to an OS 9 system so that it shows up in Finder as a PDF file.  
> From all I can gather, I have a two-line problem:
>
>   set the fileType to "CAROPDF "
>   put PDFToOpen into URL "binfile:myFile.pdf"
>
> But alas, this does not work. The file type and creator come up  
> empty. If I use ResEdit to set the file type and creator as in the  
> command above, the file becomes a PDF file that Acrobat Reader  
> recognizes. So I know I have the creator and file type correct. Am  
> I perhaps doing this in the wrong place?
>
> A clue: ResEdit tells me the file I'm writing has no resource fork.  
> I was under the impression that using "binfile" solved that problem?
>
> I gather then that this has something to do with resfile: types but  
> I can't find anything in the docs about creating a resource fork,  
> only about copying them. But when I do a getResources on an OS9  
> file, as far as I can tell, the type and creator aren't stored in  
> the resource fork (at least not as identifiable resources), so I'm  
> basically lost and under very tight deadline.
>
>
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dan Shafer, Revolution Consultant and Author
> http://www.shafermedia.com
> Get my book, "Revolution: Software at the Speed of Thought"
> From http://www.revolutionpros.com, Click "My Stuff"
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

------------------------------------------
Chris Sheffield
Read Naturally
The Fluency Company
http://www.readnaturally.com
------------------------------------------





More information about the use-livecode mailing list