• 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
NSTableView: serious flaw when it comes to text edition?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView: serious flaw when it comes to text edition?


  • Subject: NSTableView: serious flaw when it comes to text edition?
  • From: Stephane Sudre <email@hidden>
  • Date: Tue, 6 Sep 2005 12:26:49 +0200

Let's say I have a NSTableView with one column for text edition.

If I set the data cell of the column to be a NSTextFieldCell, when I click on a cell in that column, - (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *) inColumn row:(int) inRow is not invoked.

If I set the data cell of the column to be a subclass of NSTextFieldCell, when I click on a cell in that column, - (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *) inColumn row:(int) inRow is invoked.

Looks like to be an annoying design flaw in the AppKit.

The code is basically:

tPrototypeCell = [[NSTextFieldCell alloc] initTextCell: @""]; //Works
//tPrototypeCell = [[MyTextFieldCell alloc] initTextCell: @""]; // Does not work correctly


[tPrototypeCell setEditable: YES];
[tPrototypeCell setFont:[NSFont systemFontOfSize:12.0]];

tColumn=[IBarray_ tableColumnWithIdentifier:@"ColumnName"];

[tColumn setDataCell:tPrototypeCell];

[tPrototypeCell release];

MyTextFieldCell is just overriding the - drawInteriorWithFrame:inView: method. (Mac OS X 10.3.9)


_______________________________________________ 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
  • Follow-Ups:
    • Re: NSTableView: serious flaw when it comes to text edition? [SOLVED]
      • From: Stephane Sudre <email@hidden>
  • Prev by Date: Re: Drag to Nowhere and Disappearing Smoke
  • Next by Date: Checking if framework exists
  • Previous by thread: Re: NSValidationNumberTooSmallError with incomplete error message
  • Next by thread: Re: NSTableView: serious flaw when it comes to text edition? [SOLVED]
  • Index(es):
    • Date
    • Thread