NSOpenPanel runModalForTypes: argument
NSOpenPanel runModalForTypes: argument
- Subject: NSOpenPanel runModalForTypes: argument
- From: Kai-Mikael Jää-Aro <email@hidden>
- Date: Fri, 23 Dec 2005 12:15:04 +0100
In the docs (
http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSOpenPanel.htm) it says:
"runModalForDirectory:file:types: ——— types in fileTypes (an NSArray
of file extensions and/or HFS file types)"
and
"runModalForTypes:
Invokes the runModalForDirectory:file:types: method, using nil for
both the filename and directory arguments. ——— The fileTypes argument
is an NSArray containing the extensions of files to be selectable in
the browser."
Is it indeed the case that the allowed fileTypes argument is
different in the two methods, even though runModalForTypes: seems to
just be a wrapper for runModalForDirectory:? Indeed it seems that
only file extension strings are valid as arguments, I tried [panel
runModalForTypes: [NSArray arrayWithObjects: [NSNumber
numberWithUnsignedLong: 'MooV'], nil]] and got the message
2005-12-23 12:13:40.473 MakeRefMovie[17137] *** -[NSCFNumber
_getCString:maxLength:encoding:]: selector not recognized [self =
0x374010]
2005-12-23 12:13:40.511 MakeRefMovie[17137] *** -[NSCFNumber
_getCString:maxLength:encoding:]: selector not recognized [self =
0x374010]
when running.
--
Kai-Mikael Jää-Aro <email@hidden>
Popwire AB +46 70 202 6494
Årstaängsvägen 19B
SE-117 94 Stockholm
Sweden
_______________________________________________
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