• 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
NSOpenPanel setDirectory to a package
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOpenPanel setDirectory to a package


  • Subject: NSOpenPanel setDirectory to a package
  • From: Dale Jensen <email@hidden>
  • Date: Wed, 18 Jun 2008 17:18:08 -0500

I have an "application picker" bit in my preferences, which allows the user to select an app to do something. 90% of the time, I presume, this will be a package, not a single file. My code is thus:

[oPanel setTreatsFilePackagesAsDirectories: NO];
NSString *filePath = @"/Applications/Preview.app"; // just for example, it doesn't really default this way
[oPanel setDirectory:filePath];


I think those are the only relevant bits. When then open panel comes up, the application is selected, and you're looking at the root level of the package (ie: "Contents"). That's not what I want, and not what I think the above code should result in. I think that it should show the applications folder, with Preview selected (but not "open" to the Contents folder.)

If you follow a similar process in Safari to change the default RSS reader in Preferences > RSS, it performs as expected, so there must be a way to get it working, but it doesn't seem obvious.

Thanks for any pointers!


dale



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSOpenPanel setDirectory to a package
      • From: Ken Thomases <email@hidden>
  • Prev by Date: NSPathControl, Bindings and Shared User Defaults
  • Next by Date: Re: NSKeyedArchiver finishEncoding takes forever
  • Previous by thread: NSPathControl, Bindings and Shared User Defaults
  • Next by thread: Re: NSOpenPanel setDirectory to a package
  • Index(es):
    • Date
    • Thread