From: Sean L. <se...@da...> - 2005-09-16 12:14:29
|
On 16 Sep 2005, at 13:35, Jonathan Paisley wrote: > > Can you comment more on the problem with > setKeys_triggerChangeNotificationsForDependentKey? I'm currently > using it sucessfully. > > For example: > > class Foo < OSX::NSObject > ["prop1","prop2","prop2"].each do |key| > Foo.setKeys_triggerChangeNotificationsForDependentKey > (["propX"],key) > end > > # ... other stuff > end Yup, using it like that works for me too. Unfortunately I don't have a copy of the code where I was trying to get it to work and it didn't. I had just started tinkering around with RubyCocoa so I may have just made a silly error, or alternately it may not have been working properly on the 0.4.1 release... > I think I'd like to figure out the problem with the Cocoa-provided > mechanisms, since then the dependency tracking should just work > (since we already send change notifications through kvc_accessor). I hadn't seen kvc_reader, kvc_writer or kvc_accessor previously either - they remove the need for cocoa_property. (they weren't in the 0.4.1 release that I started out with). > I still think cocoa_depends_on is useful since it has far nicer > syntax, and can easily be reimplemented in terms of > setKeys_trigger... once that works. OK, sounds like a good idea. I no longer have any basis for asserting that setKeys_trigger... doesn't work anymore, it seems fine. Sean -- Sean Legassick se...@da... |