• 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: Sorting a TableView in tableView:setObjectValue:forTableColumn:row:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting a TableView in tableView:setObjectValue:forTableColumn:row:


  • Subject: Re: Sorting a TableView in tableView:setObjectValue:forTableColumn:row:
  • From: Ondra Cada <email@hidden>
  • Date: Sat, 12 Oct 2002 04:44:54 +0200

On Saturday, October 12, 2002, at 04:07 , Andreas Mayer wrote:

I have a table view with sorted rows. When a cell in my key column is changed, I re-sort my data source and reload the table.

The problem is, that the wrong row (and cell to edit) is selected afterwards.

Can anyone give ma a hint how to solve this?

Yup -- change the selection accordingly ;)

Changing the selection in tableView:setObjectValue:forTableColumn:row: does not work.

Doesn't it? Strange... I seem to recall it did for me once or twice with no problems at all.

Never mind that, it it does not, just postpone it to the end of the event,
like:

-__xx_setSel:(NSNumber*)sel {
[table selectRow:[sel intValue] byExtendingSelection:NO];
}
-tableView:setObjectValue:forTableColumn:row: {
...
[self performSelector:@selector(__xx_setSel:) withObject:newSelRow afterDelay:0];
}
---
Ondra Hada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.
  • Follow-Ups:
    • Re: Sorting a TableView in tableView:setObjectValue:forTableColumn:row:
      • From: Andreas Mayer <email@hidden>
References: 
 >Sorting a TableView in tableView:setObjectValue:forTableColumn:row: (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: Cocoa Books (was New to Cocoa)
  • Next by Date: Re: Cocoa Books (was New to Cocoa)
  • Previous by thread: Sorting a TableView in tableView:setObjectValue:forTableColumn:row:
  • Next by thread: Re: Sorting a TableView in tableView:setObjectValue:forTableColumn:row:
  • Index(es):
    • Date
    • Thread