Re: How to create a Choose Panel
Re: How to create a Choose Panel
- Subject: Re: How to create a Choose Panel
- From: Guillaume Borios <email@hidden>
- Date: Wed, 28 Aug 2002 17:42:33 +0200
- Resent-date: Wed, 28 Aug 2002 19:31:06 +0200
- Resent-from: Guillaume Borios <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: email@hidden
Or perhaps, since NSOpenPanel seems to fit your needs expect the lack
of new folder button, you could attach a NSView containing that button
linked to code from yours that would create folders...
[myPanel setAccessoryView:newFolderView];
The only drawback is the button place (not like it would be in
NSSavePanel)...
Le mercredi, 28 ao{ 2002, ` 16:49 Europe/Paris, Nathan Day a icrit :
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.
_______________________________________________
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.