Re: How to get a NSSavePanel feature in a NSOpenPanel
Re: How to get a NSSavePanel feature in a NSOpenPanel
- Subject: Re: How to get a NSSavePanel feature in a NSOpenPanel
- From: Quentin Mathé <email@hidden>
- Date: Mon, 6 Jan 2003 02:08:51 +0100
Le dimanche, 5 jan 2003, ` 11:42 Europe/Paris, email@hidden a
icrit :
In the NSSavePanel dialog, there is an option to create a new
directory.
I would like to have this option inside a NSOpenPanel. Is there a way
to do this?
The NSSavePanel can't be used since it includes a TextField to enter
the name of the file whereas what I want is just to select a
NSDirectory and if needed create one.
This was possible using the NavigationServices IIRC.
There is a structure _spFlags with a _includeNewFolder field in
NSSavePanel.h, but _spFlags is protected then we cannot access it. I
tried also with class-dump but the only private method related to this
problem I have found is _newFolder: in NSSavePanel_Appearance (a
NSSavePanel category) and it's a method to display a modal window to
enter the name of the new folder you want to create.
Then I think it's not possible with Cocoa, but may be you can do it
with Carbon. Try to use the windowRef method from NSWindow on your
NSOpenPanel and customize it with the Navigation Services If that
doesn't work, you will need to use the Carbon Navigation Services
inside you Cocoa project to manage your open panel.
--
Quentin Mathi
email@hidden
_______________________________________________
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.