• 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 return key and editing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView return key and editing


  • Subject: Re: NSTableView return key and editing
  • From: Just van Rossum <email@hidden>
  • Date: Fri, 23 May 2003 11:47:58 +0200

[following up to myself]

> Inelegant, yes, but the solution just posted by Christopher Corbell
> seems even less elegant.

Sorry, I meant code-wise; it's quite likely that his solution is more
elegant UI-wise.

> I had good results by doing this (transcribed
> from Python, so apologies for any ObjC mistakes):
>
> - (void)tableView:(NSTableView*)tableView setObjectValue:(id)newObj
> forTableColumn:(NSTableColumn*)col row:(int)row
> {
> ...update model...
> [self performSelector:forceEndEditing withObject:tableView
> afterDelay: 0];
> }

This probably should rather be:

- (void)tableView:(NSTableView*)tableView setObjectValue:(id)newObj
forTableColumn:(NSTableColumn*)col row:(int)row
{
...update model...
if (...sort order has changed...) {
[tableView reloadData];
[self performSelector:forceEndEditing withObject:tableView
afterDelay: 0];
}
}

Also, I found out if you don't deselect all in forceEndEditing but
select the proper row, the delay should be longer than 0.

Just
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: NSTableView return key and editing
  • Next by Date: Re: Transparent NSTextView makes hole in window ?
  • Previous by thread: Re: NSTableView return key and editing
  • Next by thread: Re: NSTableView return key and editing
  • Index(es):
    • Date
    • Thread