Re: Newbie: two tables on one window, how to talk to them?
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.