Re: curious behavior of Conditionally Sets Enabled in NSTableView
Re: curious behavior of Conditionally Sets Enabled in NSTableView
- Subject: Re: curious behavior of Conditionally Sets Enabled in NSTableView
- From: Greg Herlihy <email@hidden>
- Date: Fri, 03 Mar 2006 15:38:30 -0800
- Thread-topic: curious behavior of Conditionally Sets Enabled in NSTableView
Be sure to bind the selectionIndexes of the NSTableView to the
selectionIndexes of the NSArrayController. Otherwise, the selected rows in
the table will not select the corresponding items in the NSArrayController.
And I have found that things generally work better when the table and the
controller both agree on which items are currently selected.
Greg
On 3/3/06 12:01 PM, "Matt Neuburg" <email@hidden> wrote:
> I have an NSTableView whose columns are bound through the arrangedObjects of
> an NSArrayController. The table view allows multiple selection.
>
> If I select a row of the table view, fine.
>
> If I then command-click another row of the table view, both rows are
> selected, but the table view is then disabled (it loses focus and the
> selected rows turn grey). This surprised me, and it wasn't what I wanted, so
> I set out to investigate further.
>
> If I then command-click *another* row of the table view, all three rows are
> selected and the table view is enabled.
>
> If I then command-click one of the three selected rows, two rows are
> selected and the table view is enabled. So it is possible to select exactly
> two rows, but only in this roundabout way (enable three, then enable two).
>
> This behavior goes away if I uncheck "Conditionally Sets Enabled". Therefore
> I conclude that it is *due* to "Conditionally Sets Enabled". But what on
> earth could be the logic of such behavior? What does "Conditionally Sets
> Enabled" imagine it is doing? What "condition" could it be thinking of here?
> It seems to me that this behavior is just plain buggy; it serves no useful
> purpose that I can envision. Should I file a bug, or there some wonderful
> thing going on here that I'm just not appreciating? m.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden