• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTableView - Responder - 'Focus'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView - Responder - 'Focus'


  • Subject: Re: NSTableView - Responder - 'Focus'
  • From: cricket <email@hidden>
  • Date: Fri, 27 Feb 2004 12:49:33 -0800

You can ask the window that contains the tableviews for its firstResponder. Something like:

NSTableView *tv = [[_tv1 window] firstResponder];
if (tv == _tv1) {
// first tableview is selected
} else if (tv == _tv2) {
// second tableview is selected
}

- cricket

On Feb 27, 2004, at 12:40 PM, Ruediger Merz wrote:

Hi,

I am a software developer since 20 years (Pascal,C,OpenWindows,Motif, WinDSK, UNIX) but I am new to Cocoa.
I am just developing my first app in Cocoa/ObjC.
The app is document based which has two NSTableViews and 3 buttons.
Two of this buttons a responsible to add a item to either of the tables.
I rather would like to have only one button to do that.
How am I able to know which TableView is selected ?
I would appreciate if someone could help. Especially in combination with IB.
I still have to adapt to the new terminology. Please be patient with me.;)

Thanks in advanced, I appreciate it.

Styx
_______________________________________________
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.
_______________________________________________
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.


  • Follow-Ups:
    • Re: NSTableView - Responder - 'Focus'
      • From: Peter Wollschlaeger <email@hidden>
References: 
 >NSTableView - Responder - 'Focus' (From: Ruediger Merz <email@hidden>)

  • Prev by Date: NSTableView - Responder - 'Focus'
  • Next by Date: Re: NSTableView - Responder - 'Focus'
  • Previous by thread: NSTableView - Responder - 'Focus'
  • Next by thread: Re: NSTableView - Responder - 'Focus'
  • Index(es):
    • Date
    • Thread