#393: Custom accessors for KVO
----------------------------------+-----------------------------------------
Reporter: paolo.bose...@… | Owner: lsansone...@…
Type: defect | Status: new
Priority: minor | Milestone: MacRuby 0.5
Component: MacRuby | Keywords: KVO
----------------------------------+-----------------------------------------
Comment(by lsansone...@…):
Reduction:
{{{
$ cat t.rb
framework 'Foundation'
class Foo
def setFoo(o)
@foo = o
end
end
o = Foo.new
o.addObserver(self, forKeyPath: 'foo', options: 0, context: nil)
$ ./miniruby t.rb
2009-10-19 20:19:21.599 miniruby[87617:903] KVO autonotifying only
supports -set<Key>: methods that return void. Autonotifying will not be
done for invocations of -[Foo setFoo:].
}}}
I guess we should register setXXX methods with a special ObjC runtime
signature automatically (like what attr_writer / attr_accessor do by
default).
--
Ticket URL: <http://www.macruby.org/trac/ticket/393#comment:1>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel