NSBrowser
NSBrowser
- Subject: NSBrowser
- From: Drew McCormack <email@hidden>
- Date: Thu, 11 Oct 2001 16:43:22 +0200
I have set up a simple NSBrowser, and implemented the delegate methods
- (int)browser:(NSBrowser *)sender numberOfRowsInColumn:(int)column;
- (void)browser:(NSBrowser *)sender willDisplayCell:(id)cell
atRow:(int)row column:(int)column;
as indicated in the docs.
This seems to work OK.
But I also want to be able to update some other things whenever a
browser sell is clicked, depending on which cell was clicked. I thought
I could do this by setting the target of the browser, but the action
seems to get called before the cell is selected, so I can't figure out
how to determine which cell was clicked.
I also thought maybe I could try adding
- (BOOL)browser:(NSBrowser *)sender selectRow:(int)row
inColumn:(int)column
to my delegate. This requires that the delegate select the cell before
returning, but I can't figure out how to select the cell corresponding
to the row and column.
What I am trying to do seems so simple. Can anyone tell me the easy way
to do it?
Drew McCormack
================================
Dr. Drew McCormack
Department of Theoretical Chemistry
Science Faculty
Free University Amsterdam
De Boelelaan 1083
1081 HV Amsterdam
The Netherlands
Email :: email@hidden
Tel. :: +31 20 44 47623
Fax :: +31 20 44 47629