#113: cocoa's automatic NSKVONotifying subclassing breaks ivars lookup -----------------------------------+---------------------------------------- Reporter: lsansonetti@apple.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.3 Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- {{{ $ cat foo.rb framework 'cocoa' class Icon attr_accessor :name def initialize(name) @name = name end end array_controller = NSArrayController.new array_controller.setAvoidsEmptySelection(false) array_controller.setPreservesSelection(false) array_controller.setSelectsInsertedObjects(false) array_controller.setAutomaticallyRearrangesObjects(true) array_controller.setSortDescriptors(NSArray.arrayWithObject(NSSortDescriptor.alloc.initWithKey("name", ascending: false))) array_controller.addObjects([Icon.new("Rich"), Icon.new("Chad")]) p array_controller.arrangedObjects[0].inspect #=> #<NSKVONotifying_Icon:0x10fc320> p array_controller.arrangedObjects[0].name #=> nil..should not be }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/113> MacRuby <http://macruby.org/>