Re: [NSOpenPanel setTreatsFilePackagesAsDirectories] and a doc-based application
Re: [NSOpenPanel setTreatsFilePackagesAsDirectories] and a doc-based application
- Subject: Re: [NSOpenPanel setTreatsFilePackagesAsDirectories] and a doc-based application
- From: Marco Binder <email@hidden>
- Date: Sat, 8 Mar 2003 14:35:54 +0100
Yes, even your docs say so. You have to look up in the inheritance
tree, too. Just one tier above NSOpenPanel, you ll find NSSavePanel,
fromwhich it inherits. That also specifies the
treatsFilePackagesAsDirectories property.
Your question about setting the flag: you ll have to set it before
showing the panel. From the docs, too:
openPanel
+ (NSOpenPanel *)openPanel
Returns a "recycled" NSOpenPanel or, if one doesn't yet exist, creates
it before returning it. New and recycled NSOpenPanels are reset to
default values, which include selection of single files only.
and:
savePanel
+ (NSSavePanel *)savePanel
Returns an instance of NSSavePanel, creating one if necessary.
Otherwise, the instance is a recycled NSSavePanel object. The method
sets the attributes of the instance to the default values:
Current working directory as starting point
Prompt of "Name"
No required file types
==> File packages not treated as directories <==
No delegate
No accessory view
marco
Am Samstag, 08.03.03 um 14:11 Uhr schrieb Oleg Svirgstin:
Hi all!
First, I would like to know WHAT documentation is stating this?
I use the December tools, and there is NOTHING about these methods in
my
docs. (The page about NSOpenPanel that was "last published Nov. 1
2002").
As the documentation is stating:
setTreatsFilePackagesAsDirectories:
- (void)setTreatsFilePackagesAsDirectories:(BOOL)flag
See Also: - treatsFilePackagesAsDirectories
I guess it is in the new docs that sit in the web - provided with slow
connection I cannot have permanent access to them, humbly waiting for
the
docs in a wholesale-download-form...
The "setTreatsFilePackagesAsDirectories" however works (when I call a
runModal... directly).
I want to add this behavior to a document based application (a tool)
and I
cannot figure out at what point should I set this flag to
the shared NSOpenPanel.
I attempted to set it in windowDidLoad, and in some other points, too.
Nothing helps. I set this flag, but the NSOpenPanel still attempts to
open
my file package and, of course, fails. I am sure we use a shared
instance of
NSOpenPanel, but NSDocument seems to reset its flags before exposing
the
panel.
Thanks in advance...
Regards
Oleg
_______________________________________________
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.
--
|\ /| E-Mail: email@hidden WWW: www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
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.