• 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
NSConcreteMutableData and valueForKey
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSConcreteMutableData and valueForKey
      • From: "Pontus Ilbring" <email@hidden>
  • Prev by Date: Re: Package maker query
  • Next by Date: Re: translating NIBs for a new version.
  • Previous by thread: Re: Problem when overriding new Apple methods with my categories, what is the best solution?
  • Next by thread: Re: NSConcreteMutableData and valueForKey
  • Index(es):
    • Date
    • Thread