dynamic changing of ability to set multiple selections...
dynamic changing of ability to set multiple selections...
- Subject: dynamic changing of ability to set multiple selections...
- From: Matthew Weinstein <email@hidden>
- Date: Mon, 1 Feb 2010 13:26:50 -0800
Dear cocoa-ites,
I have multiple linked NSTableViews in an app. Depending on which one
is clicked in the others change their contents. Now normally if
someone clicks on table 1 they should not be allowed to have multiple
selections; but if they click in table 2, the application needs to be
able to select multiple items from table one.
At present the way I handle this is that if they click (actually
double click) in table 2. [table1 setAllowMultipleSelection: YES ] is
called, and then if I receive a selectiondidchange notification I
check to see if it's table 1 and change it back to NO (a little more
tricky than this, since messing in table 2 will send that notification
so I have an object wide flag that I set to prevent this).
But this looks sloppy. The user actally can select multiple cells in
table 1 but suddenly they are reduced to a single cell (versus not
being able to select multiple cells).
Is there a better way to turn off and turn on this behavior?
Thanks in advance!
Matthew
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden