From: Jonathan P. <jp...@dc...> - 2005-09-16 11:35:55
|
>> >> There seem to be some differences in behaviour between Panther and >> Tiger. I have a vague recollection of having to disable some of my >> ruby-level manual change notifications after the move to Tiger, >> since exceptions were appearing. What OS version are you using? > > Tiger 10.4.2 - haven't tried this on Panther. Hmmn. I can't now find the code that I was thinking about after scanning the Subversion logs for my project. Hopefully it'll turn up. >> If you can post your code and any specifics you've identified >> about the way RubyCocoa interacts with the Objective C KVO system >> that would be great. I'll try to do the same soon with the code I >> have. > > I've attached my code. It relies on the property handling stuff in > CVS HEAD (unless that's been released now ... ?) 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 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 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. Thanks Jonathan |