• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTableView receiving selection events (newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: NSTableView receiving selection events (newbie) (From: Ferhat Ayaz <email@hidden>)

  • Prev by Date: Re: (no subject)
  • Next by Date: Re: Should I use delegates or accessors?
  • Previous by thread: Re: NSTableView receiving selection events (newbie)
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread