• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unrecognized selector
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Unrecognized selector
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Re: [NSImage] Bug in System Preferences? [solved]
  • Next by Date: Re: Unrecognized selector
  • Previous by thread: Re: Basic Q: reading properties from nil
  • Next by thread: Re: Unrecognized selector
  • Index(es):
    • Date
    • Thread