Another newbie Mac Question...

Chipp Walters chipp at chipp.com
Mon Jan 5 17:07:21 EST 2004


Thanks for the PNGf note. It works!

see below...

> Behalf Of Richard
> Gaskin
> Chipp Walters wrote:
>
> > In the docs, it says with filter works. Is this a mistake?
>
> Where?  The entry for "answer file" discusses using the 'type"
> form for Mac
> OS.

>From the docs:

Filtering for Mac OS:  You can use either with filter or of type. With
either form, the types parameter consists of one or more 4-character file
types, concatenated. For example, to display text and PICT-format files but
no others, use a types parameter of ?TEXTPICT?. To display applications
only, use a types parameter of ?APPL?.

> > Also,
> > Where does one go to 'find' all the different creator types?
>
> Used to be ResEdit.  For OS X I made a droppable control in a Rev window
> with this script:
>
>
> on dragEnter
>   set the acceptDrop to true
> end dragEnter
>
> on dragDrop
>   get line 1 the dragData
>   if it is not empty then
>     put it into fld "file"
>     put it into tDir
>     set the itemdel to "/"
>     put last item of it into tFileName
>     delete last item of tDir
>     put the directory into tSaveDir
>     set the directory to tDir
>     put the detailed files into tFiles
>     set the directory to tSaveDir
>     put line lineoffset(urlEncode(tFileName), tFiles) \
>         of tFiles into tFileData
>     set the itemdel to comma
>     get last item of tFileData
>     put char 1 to 4 of it into fld "creator"
>     put char 5 to 8 of it into fld "type"
>   end if
> end dragDrop
>
>
> With OS X Apple no longer requires file type assignments, posing a problem
> for us.  I'm not sure Apple has yet decided what to do about either file
> types or creator codes for the long term, so I'm not familiar with a
> workaround for selecting files that rely only on file name extension on OS
> X.
>
> Anyone come across a current Apple tech note on this?  Last I heard Apple
> required developers to write a custom filterProc for Nav Services (ugh!).

It does appear that using the answer file with type "PNGf" works for .PNG
files




More information about the use-livecode mailing list