• 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 identify problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView identify problem


  • Subject: Re: NSTableView identify problem
  • From: Scott Anguish <email@hidden>
  • Date: Fri, 10 Jan 2003 16:38:32 -0500

On Friday, January 10, 2003, at 02:15 PM, Volker Bublitz wrote:

hi,

i'm using one class as a data source for four NSTableViews ... i set the NSTableColumn of the header to a different name and identifier. when the method

- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)row;

is triggered i need to know which NSTableView aTableView really is.. how can i access information about the title or another identifier for NSTableViews?

i know i can get the NSTableHeaderView - but how can i get the header NSTableColumn to check its identifier? or is there another way?


I'd suggest keeping the instances of each table row in variables, and then you can just compare the aTableView instance with the saved values.

So connect the individual tables in IB to outlets

NSTableView *namesTableView;
NSTableView *itemsTableView;
NSTableView *grogsTableView;
NSTableView *grogsDetailsTableView;


and then just compare in your code

if ([aTableView isEqual:namesTableView]) {

do something;

}

etc..

Or... you could set tags on the different NSTableViews in Interface Builder, and then compare the tags...

#define NamesTableTag 1

if ([aTableView tag] == NamesTableTag) {
do something;
}
_______________________________________________
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 identify problem
      • From: Volker Bublitz <email@hidden>
References: 
 >NSTableView identify problem (From: Volker Bublitz <email@hidden>)

  • Prev by Date: Re: Aqua Human Interface and Safari
  • Next by Date: Re: Mysterious console statement
  • Previous by thread: NSTableView identify problem
  • Next by thread: Re: NSTableView identify problem
  • Index(es):
    • Date
    • Thread