Re: Using isMemberOfClass with a tree of subclass of NSManagedObject
Re: Using isMemberOfClass with a tree of subclass of NSManagedObject
- Subject: Re: Using isMemberOfClass with a tree of subclass of NSManagedObject
- From: Yoann GINI <email@hidden>
- Date: Sun, 29 Jun 2008 16:09:29 +0200
Okey, I've solve the problem !
It's very simple, I've only load the in NSManagedObjectModel the mom
file represent the modification base, not the main model... Now I load
all mom file and it's work !
Thanks all
Le 29 juin 08 à 01:27, Bill Bumgarner a écrit :
On Jun 28, 2008, at 1:08 PM, Kyle Sluder wrote:
On Sat, Jun 28, 2008 at 2:14 PM, Bill Bumgarner <email@hidden> wrote:
You want -objectForKey: -valueForKey: is for key value coding,
-objectForKey: is for extracting objects from a dictionary.
Shouldn't cause a problem.
I thought the collection classes were smart and treated -valueForKey:
by sending each object in the collection -valueForKey: and compiling
the results in an object arranged in the same way as the original.
That way you could have an array of strings and do something like
[myArray valueForKey:@"length"] to get an array of lengths
corresponding to each instance.
Sort of. Depends on the collection class. The behavior you
describe works for NSArray (and NSSet, IIRC). For NSDictionary, the
rules are slightly different:
...
If key does not start with “@”, invokes objectForKey:. If key does
start with “@”, strips the “@” and invokes [super valueForKey:]with
the rest of the key.
...
Which is, frankly, a bit goofy and, thus, the primary reason why I
would avoid using -valueForKey: on a dictionary.
b.bum
_______________________________________________
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