Setting Mac OS File Type & Creator
Jeanne A. E. DeVoto
revolution at jaedworks.com
Tue Aug 16 00:42:30 EDT 2005
At 11:31 AM -0700 8/15/2005, Dan Shafer wrote:
>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"
Possibly try this instead:
set the fileType to "CAROPDF "
open file "myFile.pdf" -- create the file
close file "myFile.pdf"
put PDFToOpen into URL "binfile:myFile.pdf"
I'm not sure whether it will work - your original code works fine
here - but there may be some nuance or other operating with URLs.
>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?
Actually no; whether a file is binary or not doesn't affect whether
it has a resource fork. (PDFs normally have no resource fork anyway.)
The type and creator are stored as part of the file meta-information,
which isn't in either fork....
--
jeanne a. e. devoto ~ revolution at jaedworks.com
http://www.jaedworks.com
More information about the use-livecode
mailing list