NSConcreteMutableData and valueForKey
NSConcreteMutableData and valueForKey
- Subject: NSConcreteMutableData and valueForKey
- From: "Julio Cesar Silva dos Santos" <email@hidden>
- Date: Fri, 15 Dec 2006 09:45:30 -0200
Hi,
I am trying to test a string in an NSManagedObject to perform some
operations (enable/disable a button) but I am receiving this message:
[NSConcreteMutableData isEqualToString:]: selector not recognized [self =
0x5731660];
The code look like this:
NSString * theStringToTest = [myManagedObject valueForKey:@"nameOfKey"];
if ([theStringToTest isEqualToString:@"theStringToCompare"]) {
[theButton setEnabled:YES];
} else {
[theButton setEnabled:NO];
}
I know that valueForKey returns an id but the assignment of valueForKey to
theStringToTest does not raise any exception, only the comparison. If I just
use isEqualTo there is no exception but the objects are never the same. Do I
have to take another approach?
Thanks for any help,
--
Julio Cesar Silva dos Santos
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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