• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Filtering files in NSOpenPanel that NSAppleScript can run
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Filtering files in NSOpenPanel that NSAppleScript can run (From: "Sean McBride" <email@hidden>)
 >Re: Filtering files in NSOpenPanel that NSAppleScript can run (From: "Adam R. Maxwell" <email@hidden>)
 >Re: Filtering files in NSOpenPanel that NSAppleScript can run (From: "Sean McBride" <email@hidden>)
 >Re: Filtering files in NSOpenPanel that NSAppleScript can run (From: "Adam R. Maxwell" <email@hidden>)
 >Re: Filtering files in NSOpenPanel that NSAppleScript can run (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Filtering files in NSOpenPanel that NSAppleScript can run
  • Next by Date: Re: Non-square (triangular) views
  • Previous by thread: Re: Filtering files in NSOpenPanel that NSAppleScript can run
  • Next by thread: What happens in runModalForDirectory:file:types
  • Index(es):
    • Date
    • Thread