Re: NSTableView receiving selection events (newbie)
Re: NSTableView receiving selection events (newbie)
- Subject: Re: NSTableView receiving selection events (newbie)
- From: James Bucanek <email@hidden>
- Date: Tue, 26 Dec 2006 08:36:58 -0700
Ferhat Ayaz wrote on Tuesday, December 26, 2006:
>I have still problems to receive notifications. This is my controller
>methode
>
>- (void)awakeFromNib
>{
>
> [[NSNotificationCenter defaultCenter] addObserver:self
> selector:@selector(selectionChanged:)
> name:NSTableViewSelectionDidChangeNotification object:nil];
>}
>
>And this is my selector in the same class
>
>- (void) selectionChanged: (NSNotification *) notification
>{
> int row;
> row = [projectFoldersTableView selectedRow];
>
> if (row == -1) {
> printf("Ok changed\n");
> } else {
> printf("No row\n");
> }
>
>} // tableViewSelectionDidChange
>
>I should receive the notification for all tableviews but I'm
>receiving nothing.
>Do you have any idea?
Does awakeFromNib get called? (Is your controller created in the NIB?) The debugger is your friend.
--
James Bucanek
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden