• 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: Opening Invisible Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening Invisible Files


  • Subject: Re: Opening Invisible Files
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sun, 25 Jan 2009 20:31:34 +0700


On 25 Jan 2009, at 09:31, Rob Keniger <email@hidden> wrote:

On 24/01/2009, at 11:40 PM, Gerriet M. Denkmann wrote:

I want my NSOpenPanel to show all files - same as the Finder does,
if one adds AppleShowAllFiles = YES to: ~/Library/Preferences/
com.apple.finder.plist.

Is there a way to accomplish this?

Kind regards,

Gerriet.

Yes, just set AppleShowAllFiles to YES in your app's defaults.

I just added this to my app delegate:
+ (void)initialize
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSDictionary *appDefaults = [NSDictionary dictionaryWithObject: @"YES" forKey: @"AppleShowAllFiles"];
[defaults registerDefaults:appDefaults];
}


and now everything works as expected.
Thanks very much for this suggestion!

By the way, this is documented in "Mac OS X Leopard Developer Release Notes
Cocoa Application Framework":
"NSSavePanel and NSOpenPanel can once again show hidden files by setting a user default. For instance you can use 'defaults write -g AppleShowAllFiles 1' to display hidden files in the panels."


Kind regards,

Gerriet.

_______________________________________________

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


  • Prev by Date: Re: Opening Symbolic Links
  • Next by Date: Re: Forcing allocation of a subclass
  • Previous by thread: Re: Opening Invisible Files
  • Next by thread: Opening Symbolic Links
  • Index(es):
    • Date
    • Thread