two tables, one button
two tables, one button
- Subject: two tables, one button
- From: Chris Silverberg <email@hidden>
- Date: Wed, 11 Jun 2003 09:34:23 -0700
- Organization: Silverberg.Net
Hi folks,
Imagine a window with two NSTableViews and an NSButton. The button is
intended to perform an action on the selected item of either table that is
firstResponder. If there is no selection in the table that is
firstResponder, the button should be disabled.
I'm not clear on how to keep the button in sync with the two tables.
Watching for NSTableViewSelectionDidChangeNotification is a partial
solution... but if the user switches between the tables the selection may
not change, but the one table may not have a selection which requires the
button to enable or disable.
So, I guess my question is... is there a way to be notified if the
firstResponder changes for a window or a particular object? Or is there a
better way of maintaining the enable/disable state of a button that works on
multiple tables?
thanks much,
Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.