[MacRuby-devel] [MacRuby] #507: valueForKey(key) no longer working with NSManagedObject subclasses.

MacRuby ruby-noreply at macosforge.org
Tue Dec 15 08:10:47 PST 2009


#507: valueForKey(key) no longer working with NSManagedObject subclasses.
-----------------------------------+----------------------------------------
 Reporter:  johnmacshea@…          |       Owner:  lsansonetti@…              
     Type:  defect                 |      Status:  new                        
 Priority:  major                  |   Milestone:                             
Component:  MacRuby                |    Keywords:  valueForKey, KVC, Core Data
-----------------------------------+----------------------------------------
 In MacRuby 0.4 - any method in an NSManagedObject subclass (or in any
 other class) could be bound (eg via a controller) to a (view)
 nscontroller/field.

 Now - in 0.5 beta 1 and 2 (unless a variable of the same name is a
 property in the Entity that the NSManagedObject represents)
 valueForUndefinedKey(key) is called in the subclass, if that method
 exists, or an error occurs (if valueForUndefinedKey(key) does not exist) -
 eg: [<Student 0x200391280> valueForUndefinedKey:]: the entity Student is
 not key value coding-compliant for the key "age".

 This does not occur in a non NSManagedObject subclass - when view objects
 are bound to other classes' methods(attributes) - it all works fine.

 The different version of NSManagedObject valueForKey could be the culprit
 vis a vis valueForKey in NSObject, but in any case - as mentioned - it
 worked fine in 0.4.

 Example project attached.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/507>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list