#201: rb_objc_define_kvo_setter does not handle the case where the user might
override the regular Ruby writer method.
-------------------------------------+--------------------------------------
Reporter: eloy.de.en...@… | Owner: lsansone...@…
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/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel