• 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: Re: NSSavePanel, NSOpenPanel... Where is NSChoosePanel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: NSSavePanel, NSOpenPanel... Where is NSChoosePanel?


  • Subject: Re: Re: NSSavePanel, NSOpenPanel... Where is NSChoosePanel?
  • From: "Bruce Johnson" <email@hidden>
  • Date: Sat, 26 Aug 2006 10:10:57 -0700

Here is how I do it:
	NSOpenPanel *panel = [NSOpenPanel openPanel];
	NSBundle *appBundle = [NSBundle mainBundle];
	NSString *appPath = [appBundle bundlePath];


	[panel setCanChooseDirectories: YES];
	[panel setCanChooseFiles: NO];
	[panel setPrompt: @"Choose Directory"];
	[panel setMessage: @"Choose Directory for Data"];

	[panel beginSheetForDirectory: [appPath stringByDeletingLastPathComponent]
							 file: nil
							types: nil
				   modalForWindow: [dataTextField window]
					modalDelegate: self
				   didEndSelector: @selector(setDataDirectory: returnCode: contextInfo:)
					  contextInfo: NULL];


On 8/26/06, Jeremy Dronfield <email@hidden> wrote:

On 26 Aug 2006, at 1:23 pm, Trygve Inda wrote:

> I need to allow the user to choose a directory. NSSavePanel doesn't
> quite
> work since it prompts for a filename and NSOpenPanel does not allow
> the use
> of setCanCreateDirectories.

Sure it does. Remember, NSOpenPanel inherits from NSSavePanel.

Jeremy

 _______________________________________________
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



--
----
Bruce Johnson
email@hidden
_______________________________________________
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: 
 >NSSavePanel, NSOpenPanel... Where is NSChoosePanel? (From: Trygve Inda <email@hidden>)
 >Re: NSSavePanel, NSOpenPanel... Where is NSChoosePanel? (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Re: Pixel Format of CIImage (documentation question)
  • Next by Date: Re: transparent proxy using forwardInvocation, how?
  • Previous by thread: Re: NSSavePanel, NSOpenPanel... Where is NSChoosePanel?
  • Next by thread: How to calculate diagonal size of text?
  • Index(es):
    • Date
    • Thread