Unrecognized selector
Unrecognized selector
- Subject: Unrecognized selector
- From: email@hidden
- Date: Tue, 26 Oct 2010 18:42:47 -0600
I do this in a .mm file:
Str ext = bfn.GetExtension();
if(!ext.CompareNoCase("pcm"))
{
Str path = bfn.GetPath();
NSString *nspath = [NSString stringWithCString:(const char*)path
encoding:NSUTF8StringEncoding];
NSFileManager *fm = [NSFileManager defaultManager];
NSDictionary *attributes = [NSDictionary dictionaryWithObjects:
[NSArray arrayWithObjects:@"PCS",@"PCDA",nil] forKeys:[NSArray
arrayWithObjects:NSFileHFSTypeCode,NSFileHFSCreatorCode,nil]];
NSError *error;
[fm setAttributes:attributes ofItemAtPath:nspath error:&error];
}
and get this error:
-[NSCFString unsignedLongValue]: unrecognized selector sent to
instance 0x446990
when executing this line:
[fm setAttributes:attributes ofItemAtPath:nspath error:&error];
in debugger fm is good and nspath is good and attributes looks good
when doing po attributes.
Can someone shed some light on thos error for me?
-koko
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden