[MacRuby] #201: rb_objc_define_kvo_setter does not handle the case where the user might override the regular Ruby writer method.
#201: rb_objc_define_kvo_setter does not handle the case where the user might override the regular Ruby writer method. -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- In my opinion, the setter created by rb_objc_define_kvo_setter should check if the user might have overrided the regular Ruby writer method and call it. Consider: {{{ class Foo attr_accessor :bar def bar=(value) @bar = 'bar' # super # depending on the impl. end end f = Foo.new f.bar = "foo" f.bar # => "bar" f.setBar("foo") f.bar # => "foo" }}} The user will expect the value to always be "bar" as defined in the #bar= impl. -- Ticket URL: <http://www.macruby.org/trac/ticket/201> MacRuby <http://macruby.org/>
#201: rb_objc_define_kvo_setter does not handle the case where the user might override the regular Ruby writer method. -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: wontfix Keywords: | -------------------------------------+-------------------------------------- Changes (by eloy.de.enige@…): * status: new => closed * resolution: => wontfix Comment: Users should override the #setFoo method. -- Ticket URL: <http://www.macruby.org/trac/ticket/201#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby