need sample - trapping a click in a nstableview

ksignorini

Registered
I need to change some various data fields in other objects in a window whenever the user clicks any particular row in a tableview.

Does anyone have any sample code on how to trap the click even in the tableview?

Once I know the user has clicked, I think I can get the row # with selectedrow or clickedrow, can I not?

The key is to have trap the click and update the other objects (data fields) at that time, based on which row is selected.

Can anyone please help me with this?

Thanks,
Kent!
 
I have no sample code, but this is an easy problem. You must set an object as the tableview's delegate, and you must implement this method on the delegate.

- (void) tableViewSelectionDidChange:(NSNotification *)note
 
anarchie said:
I have no sample code, but this is an easy problem. You must set an object as the tableview's delegate, and you must implement this method on the delegate.

- (void) tableViewSelectionDidChange:(NSNotification *)note

Great!

btw: I just looked through the Help again, and found this method! I can't believe I missed it last night. Thanks again!

Kent!
 
Back
Top