• 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: Newbie: two tables on one window, how to talk to them?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: two tables on one window, how to talk to them?


  • Subject: Re: Newbie: two tables on one window, how to talk to them?
  • From: Keith Pritchard <email@hidden>
  • Date: Mon, 2 Sep 2002 17:24:08 +0100

Tony,

On Monday, September 2, 2002, at 04:59 PM, Tony S. Wu wrote:
> - (int) numberOfRowsInTableView:(NSTableView *)aTableView
> {
> if (aTableView == myTableViewOutlet)
> // do something
> else if (aTableView == mySecondTableViewOutlet)
> // do something else
> }

Thanks! confirms what I was doing (except for the = rather than ==
typo... too much basic/delphi recently, not enough C.

How does it work for notifications though?
I have
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
{
NSLog(@"Selected row %i, Group %@",[tableview1 selectedRow],[myArray
objectAtIndex:[tableview1 selectedRow]] );
}

This gets called even if I click a row in tableview2 (but of course
it's showing data from tableview1 as coded above).... How should I be
checking which view sent the notification?

> By the way, you don't necessary follow this, better start with capital
> letter with class name :D
> Like: NewsController.m/h
> Cocoa's name convention :)

It's being followed but only in the things that projectbuilder/ib
created ;-) so valid comment, thanks :)

Keith
_______________________________________________
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: Newbie: two tables on one window, how to talk to them?
      • From: Mark de Jong <email@hidden>
    • Re: Newbie: two tables on one window, how to talk to them?
      • From: Ondra Cada <email@hidden>
    • Re: Newbie: two tables on one window, how to talk to them?
      • From: "Tony S. Wu" <email@hidden>
References: 
 >Re: Newbie: two tables on one window, how to talk to them? (From: "Tony S. Wu" <email@hidden>)

  • Prev by Date: Attribute ranges & string ranges
  • Next by Date: Re: Newbie: two tables on one window, how to talk to them?
  • Previous by thread: Re: Newbie: two tables on one window, how to talk to them?
  • Next by thread: Re: Newbie: two tables on one window, how to talk to them?
  • Index(es):
    • Date
    • Thread