Re: How to create a Choose Panel
Re: How to create a Choose Panel
- Subject: Re: How to create a Choose Panel
- From: Nathan Day <email@hidden>
- Date: Thu, 29 Aug 2002 00:19:28 +0930
So what you want is the user to be able to choose a directory that
already exists but give them the option of create a new one with a new
folder button. Perhaps you could implement it something like Apples
Project Builder when creating new projects, let them choose a
destination folder (using open panel) and then specify a name for a new
folder in the destination if they so choose. Or use the save panel and
use the new name they return as the name of the new folder that you
create so the user always gets a new folder. To get what you want I
think you will have to build your own choose panel.
On Wednesday, August 28, 2002, at 10:02 PM, Massimiliano Bigatti wrote:
Thanks Nathan,
I tried using an open panel with type "fold" but it didn't work. I
get the same behaviour as:
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setAllowsMultipleSelection:NO];
[panel setCanChooseDirectories:YES];
[panel setCanChooseFiles:NO];
[panel setTitle:@"Choose source directory"];
[panel setPrompt:@"Choose"];
which is the code using to get the source directory. The problem is
that the first button on the bottom left is "Add to Favourites" and not
"Create new Directory" wich is what I get with:
NSSavePanel *panel = [NSSavePanel savePanel];
[panel setTitle:@"Choose destination directory"];
[panel setPrompt:@"Choose"];
the latter doesn't allow to choose a directory. Also setting the file
type on the save panel:
[panel setRequiredFileType:@"fold"];
does not work.
Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.