Re: Filtering files in NSOpenPanel that NSAppleScript can run
Re: Filtering files in NSOpenPanel that NSAppleScript can run
- Subject: Re: Filtering files in NSOpenPanel that NSAppleScript can run
- From: "Sean McBride" <email@hidden>
- Date: Fri, 17 Nov 2006 10:31:39 -0500
- Organization: Rogue Research
On 2006-11-16 20:55, Adam R. Maxwell said:
>> There appear to be no UTIs for AppleScript. The only thing I can
>> think
>> of is to preflight each file by calling initWithContentsOfURL:error:
>> and
>> see if it fails (likely slow) or hardcoding the 5 extensions that
>> today's Script Editor can save (not future-proof).
>
>It has UTIs com.apple.applescript.script and
>com.apple.applescript.text, according to <http://www.devworld.apple.com/
>documentation/Carbon/Conceptual/understanding_utis/utilist/
>chapter_4_section_1.html
> >. I recently discovered these while trying to do the exact same
>thing.
Ah, thanks for that! Odd that "com.apple.applescript" appears nowhere
in the 10.4 SDK, which I grepped before posting.
Of course, NSOpenPanel can't actually filter by UTIs. :( So what was
your final solution? Using Navigation Services? Using NSOpenPanel with
a custom filter that checks each file's UTI?
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden