Re: Choosing correct ArrayController depending on active TableView

2012-02-23 Thread Mike Abdullah
The windows's first responder will tell you if one of the table views has 
focus. If there are other UI elements in the window which can have focus 
though, this won't be good enough. Instead you'll have to start tracking the 
first responder yourself and recording which table had it last

Sent from my iPad

On 21 Feb 2012, at 10:43 AM, Mikael Wämundson co...@wamundson.eu wrote:

 Hi,
 
 I have two ArrayControllers in IB, ArrayControllerA and ArrayControllerB, 
 who'scontent are setup to show in two TableViews, TableViewA and 
 TableViewB. Pressing a button in the interface will perform some actions on 
 the selected objects from TableViewA or TableViewB. I can of course select 
 objects in either of the two TableViews, but the most recent selected 
 TableView is active or focused.
 
 My question is: how do I, when pressing the button, get information on which 
 TableView is active, hence which ArrayController's content I should perform 
 actions on?
 
 Thanks!
 /Mikael
 
 
 ___
 
 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:
 https://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
 
 This email sent to cocoa...@mikeabdullah.net

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Choosing correct ArrayController depending on active TableView

2012-02-22 Thread Mikael Wämundson
Hi,

I have two ArrayControllers in IB, ArrayControllerA and ArrayControllerB, who's 
content are setup to show in two TableViews, TableViewA and TableViewB. 
Pressing a button in the interface will perform some actions on the selected 
objects from TableViewA or TableViewB. I can of course select objects in either 
of the two TableViews, but the most recent selected TableView is active or 
focused.

My question is: how do I, when pressing the button, get information on which 
TableView is active, hence which ArrayController's content I should perform 
actions on?

Thanks!
/Mikael


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com