NSData category
NSData category
- Subject: NSData category
- From: Torsten Curdt <email@hidden>
- Date: Tue, 16 Feb 2010 14:21:55 +0100
I am really really irritated. Got an iPhone project. Got quite some
categories with additions to the standard APIs. All good.
Just the darn NSData refuses to accept the category ... and I have no
clue why. It's as simple as
@interface NSData (NSDataAdditions)
+ (id) dataWithHexString:(NSString*)theHex;
- (NSString*) hexString;
@end
I've tried prefixing the methods, I've use a more exotic category name
than just NSDataAdditions. Whatever I am trying ... the class/object
does not have the selectors. Even something simple as
NSData *data = [NSData data]; //[NSData dataWithHexString:@"aabbccdd"];
NSLog(@"@%", [data hexString]);
gives me
-[NSConcreteData hexString]: unrecognized selector sent to instance ...
Why NSConcreteData? Does it create a different object under the hood
so my category is not applicable?
I've used NSData categories before and the worked just fine.
Is there a way in gdb to look at the categories/method lists easily?
Or should they selectors show up through class_copyMethodList?
Could really use some ideas here.
cheers
--
Torsten
_______________________________________________
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