Re: Key path help for complex binding

2009-12-02 Thread Quincey Morris
On Dec 2, 2009, at 12:18, Kyle Sluder wrote: > On Wed, Dec 2, 2009 at 11:37 AM, Quincey Morris > wrote: >> In some cases, you can do the wrong thing -- change the instance variable >> directly -- and still be KVO compatible if you manually call the >> willChangeValueForKey:/didChangeValueForKey

Re: Key path help for complex binding

2009-12-02 Thread Ken Thomases
On Dec 2, 2009, at 1:47 PM, David Hirsch wrote: This is quite helpful, Quincey, but one thing you wrote surprises me: If you have a simple 'int' property backed by a single 'int' instance variable, changing the variable directly in your class implementation will not generate any KVO notific

Re: Key path help for complex binding

2009-12-02 Thread Kyle Sluder
On Wed, Dec 2, 2009 at 11:37 AM, Quincey Morris wrote: > In some cases, you can do the wrong thing -- change the instance variable > directly -- and still be KVO compatible if you manually call the > willChangeValueForKey:/didChangeValueForKey: methods (or the similar ones > designed specifical

Re: Key path help for complex binding

2009-12-02 Thread David Hirsch
This is quite helpful, Quincey, but one thing you wrote surprises me: If you have a simple 'int' property backed by a single 'int' instance variable, changing the variable directly in your class implementation will not generate any KVO notifications. Changing the *property* -- which in that

Re: Key path help for complex binding

2009-12-02 Thread Quincey Morris
On Dec 2, 2009, at 09:43, David Hirsch wrote: > Are there docs (other than the official ones, which in this particular area > are inscrutable to me) that discuss this idea of a proxy? I'd like to know > more on this topic, so as to avoid similar problems in the future. I recommend you *do* fa

Re: Key path help for complex binding

2009-12-02 Thread Ken Thomases
On Dec 2, 2009, at 11:43 AM, David Hirsch wrote: That did indeed solve the problem. Are there docs (other than the official ones, which in this particular area are inscrutable to me) that discuss this idea of a proxy? I'd like to know more on this topic, so as to avoid similar problems i

Re: Key path help for complex binding

2009-12-02 Thread David Hirsch
Thanks, Quincey- That did indeed solve the problem. Are there docs (other than the official ones, which in this particular area are inscrutable to me) that discuss this idea of a proxy? I'd like to know more on this topic, so as to avoid similar problems in the future. -Dave On Dec 2, 2

Re: Key path help for complex binding

2009-12-02 Thread Quincey Morris
On Dec 1, 2009, at 16:19, David Hirsch wrote: > The problem is, when I add a new Room to the master rooms array, and then add > that room to the roomCosts array of each Course's roomConstraint, the table > column doesn't get updated, until I tweak it manually (by adding a new > course). It is

Re: Key path help for complex binding

2009-12-01 Thread David Hirsch
Well, I found a work-around. Bindings still fail to work, but I can trigger a KVO message to be sent to the NSTableColumn manually by calling rearrangeObjects on my intermediary NSArrayController (selectedCourseRoomCosts). I'd still like to make bindings do this without the kludge. -Dave

Key path help for complex binding

2009-12-01 Thread David Hirsch
First thanks for all the help to date. I'm learning a great deal. The current problem: I have a model for which I cannot seem to figure out the correct key paths for binding. My doc has a rooms array (of Rooms) and a courses array (with NSArrayControllers). Each course has a roomConstraint