Re: NSOpenPanel runModalForTypes: argument
Re: NSOpenPanel runModalForTypes: argument
- Subject: Re: NSOpenPanel runModalForTypes: argument
- From: j o a r <email@hidden>
- Date: Fri, 23 Dec 2005 12:23:51 +0100
Hej,
On 23 dec 2005, at 12.15, Kai-Mikael Jää-Aro wrote:
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]
The documentation indicates that you should encode HFS types like this:
NSArray *fileTypes = [NSArray arrayWithObjects: @"txt", @"text",
NSFileTypeForHFSTypeCode( ‘TEXT’ ), nil];
<
http://developer.apple.com/documentation/Cocoa/Conceptual/
AppFileMgmt/Tasks/UsingAnOpenPanel.html>
Would that work in your case? Have you tried it?
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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