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: Jim Correia <email@hidden>
- Date: Fri, 17 Nov 2006 11:31:29 -0500
On Nov 17, 2006, at 11:19 AM, Sean McBride wrote:
On 2006-11-17 07:52, Adam R. Maxwell said:
I've never used Nav Services, and since my code was actually
superseded by other changes, I don't recall exactly what I did :).
Elsewhere I've used
NSDictionary *dict = [(id)UTTypeCopyDeclaration((CFStringRef)aType)
autorelease];
NSArray *types = [[dict objectForKey:(id)kUTTypeTagSpecificationKey]
objectForKey:(id)kUTTagClassFilenameExtension];
Thanks, I guess I'll do something similar
It appears that the easier thing to do which covers all cases is to
just test the type conformance in the file panel's delegate.
If you want to do the work up front, and let the open panel do the
work, you should also get the OSTypes from the type declaration, and
pass them to the open panel so that you handle the case of scripts
with no extension but the correct HFS type.
Jim
_______________________________________________
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