[MacRuby] #629: Bindings not working for subclass
#629: Bindings not working for subclass ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: lsansonetti@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Binding to a property that is overridden by a subclass causes a 'valueForUndefinedKey:]: this class is not key value coding-compliant for the key' error. Expected behavior: binding should call the method on the subclass. I've attached a project that throws this error on launch. The AppDelegate contains Person and Teacher instances. The nib file has a label bound to each. Removing the binding to teacher.name or changing the binding to a property that is not overridden makes the bug go away. I was using an early nightly for beta 0.6. I've also tested with the latest nightly: macruby_nightly-2010-03-06-1240.pkg -- Ticket URL: <http://www.macruby.org/trac/ticket/629> MacRuby <http://macruby.org/>
#629: Bindings not working for subclass ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: lsansonetti@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by lsansonetti@…): Still failing with trunk as of today. -- Ticket URL: <http://www.macruby.org/trac/ticket/629#comment:1> MacRuby <http://macruby.org/>
#629: Bindings not working for subclass ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: lsansonetti@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by lsansonetti@…): Smaller reduction: {{{ $ cat t2.rb class Foo def name; 'foo'; end end class Bar < Foo def name; 'bar'; end end o=Bar.new p o.valueForKey('name') $ ./miniruby t2.rb NSUnknownKeyException: [<Bar 0x4004b1dc0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key name. (RuntimeError) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/629#comment:2> MacRuby <http://macruby.org/>
#629: Bindings not working for subclass ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: lsansonetti@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: ---------------------------------+------------------------------------------ Comment(by lsansonetti@…): Thibault found out that the Bar method does not have an objc arity of 2 which is causing the exception. -- Ticket URL: <http://www.macruby.org/trac/ticket/629#comment:3> MacRuby <http://macruby.org/>
#629: Bindings not working for subclass ---------------------------------+------------------------------------------ Reporter: dylan@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.6 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------+------------------------------------------ Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.6 Comment: Should be fixed in r3947. Specs were added in 3948. -- Ticket URL: <http://www.macruby.org/trac/ticket/629#comment:4> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby