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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com