On 2010-11-29, at 14:50 , Alan Skipp wrote:
>
> There's a brief article here
> http://www.oreillynet.com/ruby/blog/2006/01/ruby_design_patterns_observer.html
>
> The procedure for setting up observers is quite different to KVO and I
> imagine it has different advantages/disadvantages to KVO, tho
There's a brief article here
http://www.oreillynet.com/ruby/blog/2006/01/ruby_design_patterns_observer.html
The procedure for setting up observers is quite different to KVO and I imagine
it has different advantages/disadvantages to KVO, though I must admit I'm not
particularly familiar with ruby
I'm not familiar with the Ruby observer mechanism you refer to - could you post
a link?
Matt
On Nov 29, 2010, at 6:34 AM, Alan Skipp wrote:
> I hope people don't mind me posting this bit of code to the list, but I hope
> it will be of some use to others and would also be interested to hear if
I hope people don't mind me posting this bit of code to the list, but I hope it
will be of some use to others and would also be interested to hear if the
technique has any problems which I've not foreseen.
Ruby has its own means of implementing the observer pattern, but as Key Value
Observing (
Binding should work through Interface Builder, but I was only speaking
of the example in the original post. Traditional-style attr_writers
invoked by Ruby code bypass key-value observers, but it seems
intuitive to me to allow them to notify observers given how pervasive
key-value coding is in Cocoa
Isn't it already working? At least for primitiv types?
Eg. when I bind a label to a Int property which i change with a slider
bind to the same property i don't need additional code for KVO.
Cheers
Thilo
On 13.05.2009 22:31 Uhr, Jeremy Voorhis wrote:
I've created a ticket at https://www.macr
I've created a ticket at https://www.macruby.org/trac/ticket/252. I
might be wrong as I am still grokking the Objective-C runtime, but it
seems to me that this should be easy to implement if attr_accessor and
attr_writer generate the setKey: method first and then implement #key=
in terms of setKey:
Hi Jeremy,
That's a pretty good idea! Could you file a bug on the tracker so that
we do not forget about it?
Thanks,
Laurent
On May 12, 2009, at 10:18 AM, Jeremy Voorhis wrote:
Hello,
I've been learning Cocoa, Objective-C and macruby in tandem and I was
just wondering, are there any plans
Hello,
I've been learning Cocoa, Objective-C and macruby in tandem and I was
just wondering, are there any plans to integrate the key-value
observing protocol with the attr_accessor family of methods? With a
little experimentation, I found KVO is definitely possible with
macruby, but the syntax is