Re: Problem with tableViewSelectionDidChange
Re: Problem with tableViewSelectionDidChange
- Subject: Re: Problem with tableViewSelectionDidChange
- From: Andy Lee <email@hidden>
- Date: Sat, 1 Oct 2005 19:36:54 -0400
On Oct 1, 2005, at 7:14 PM, Jerry Brace wrote:
The problem being that the event doesn't fire. I have the below
event in a subclass of NSTableView. I've added another event
(keyUp) to test to be sure the subclass was working and it worked.
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
{
NSLog(@"FIRED!!");
NSTableView *tv = [aNotification object];
[tv editColumn: 0
row:[tv selectedRow]
withEvent: nil
select: YES];
}
-tableViewSelectionDidChange: is a delegate method, so you need to
connect the table's delegate outlet to an object that implements this
method. Try making the table view its own delegate (might be tricky
in IB -- I haven't connected an object to itself recently, so I don't
remember offhand). Typically, though, one implements a delegate
method in a separate controller class, not a subclass of the view class.
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden