• 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
Handler not called on table cell edit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handler not called on table cell edit


  • Subject: Handler not called on table cell edit
  • From: Ken Tozier <email@hidden>
  • Date: Mon, 13 Oct 2008 02:13:10 -0400

Hi

I have a dynamically created table with one editable column (page number), but when I change the number and hit "return", my assigned handler never gets called.

Here's how the cell is defined:

pageCell = [[NSTextFieldCell alloc] init];
[pageCell setEditable: YES];
[pageCell setTarget: self];
[pageCell setAction: @selector(handlePageNumberChange:)];


Here's where it's added to the "page number" column:

pageColumn = [[NSTableColumn alloc] initWithIdentifier: @"page"];
[pageColumn setWidth: 20];
[pageColumn setMinWidth: 20];
[pageColumn setMaxWidth: 20];
[pageColumn setDataCell: pageCell]; // <- CELL ADDED HERE
[pageColumn bind: @"value" toObject: self withKeyPath: @"pages.pageNumber" options: nil];


And here's the hander:

- (void) handlePageNumberChange:(id) inSender
{
	NSLog(@"handlePageNumberChange: %@", inSender);
}


Seems like it should be pretty straightforward. Anyone see what I'm doing wrong?


Thanks for any help

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


  • Follow-Ups:
    • Re: Handler not called on table cell edit
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Re: waiting for an NSThread
  • Next by Date: Re: Handler not called on table cell edit
  • Previous by thread: Re: NSComboBox, bindings, and auto-complete, oh my!
  • Next by thread: Re: Handler not called on table cell edit
  • Index(es):
    • Date
    • Thread