Re: Two NSTableViews acting as one
Re: Two NSTableViews acting as one
- Subject: Re: Two NSTableViews acting as one
- From: The Karl Adam <email@hidden>
- Date: Wed, 2 Nov 2005 14:52:59 -0500
Bind selectionIndexes of both tableViews to the arrayController's
selectionIndexes. Now your selections will be seamless across both
tables at all times.
-Karl
On 11/2/05, Jason Bell <email@hidden> wrote:
> In the UI for the next release of my app, I have a space that appears
> to be one list of items. However, it is actually a fixed list
> followed by a separator bar and then a dynamic list (similar to the
> left side of the finder). I implemented this using two NSTableViews,
> each bound to an array controller. The problem is that even though
> they are two separate table views, they need to behave together like
> one table view that does not allow a multiple or empty selection. I
> got most of the way there using a combination of
> selectionShouldChangeInTableView, tableViewSelectionDidChange, and
> some toggling of setAllowsEmptySelection. However, there always
> seems to be a way to trip it up and get to a point where nothing
> appears selected or something appears as selected in both lists.
>
> I'm stating to think there might be a cleaner way to accomplish this
> goal. I'm relatively new to bindings so perhaps I'm making things
> overly difficult in how I am using my table view delegate to change
> the current selection in the array controllers. Not necessarily some
> code but any thoughts about a different way to approach this would be
> much appreciated.
>
> Thanks,
> Jason
>
> _______________________________________________
> 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
>
_______________________________________________
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