Isn't this list great? After an hour of debugging, all you have to do is send an email and few minutes later your problem is solved :-)

It turned out that the bug was this: I poked around master NSTableView and it had a binding of 'content' to the same master array controller that was also bound to table column (with the key 'name'). I guess I clicked inadvertently and set this binding. Now why this prevented selection notifications I do not know. After I removed this 'content' binding everything worked as it should.

But it again confirmed that bindings are not quite what they should be. This bug should never happen to me or should be resolved in 5 minutes: InterfaceBuilder should prevent illegal combinations or there should be a debugging option that would show me which binding step in runtime is failing. This kind of magic which bindings are doing can only work when one has access to the source code, so debugging is possible. Currently, if bindings don't work, you can only click around and hope something turns out. Not satisfactory at all.

To stop ranting and be constructive, is there a way of debugging bindings that would uncover this kind of bug?


izidor


On 23.7.2008, at 18:11, Izidor Jerebic wrote:

Hello!

I have a very simple (one would think) master-detail arrangement: there is a domain object, which has several items, each of items has several parts.

In the GUI window which represents domain object, one array controller is bound to FileOwner.items (file owner is a domain object), and this is displayed in NSTableView and it works fine. Then there is another array controller, which is bound to first array controller's selection and model key path 'parts'. This is displayed in NSCollectionView.

The problem is that when selection is changed in NSTableView, nothing at all changes in NSCollectionView. I have inserted NSLog in the 'parts' method and it is called exactly once - when the nib is loaded....

So the parts are displayed only once for the first selected item, and afterwards nothing changes, despite the change of selection.

Now, can somebody suggest what am I doing wrong or how can I debug this not-working setup?


Thanks in advance,

izidor


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to