• 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: Changing NSTableView DataSource without glitching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing NSTableView DataSource without glitching


  • Subject: Re: Changing NSTableView DataSource without glitching
  • From: Conor Dearden <email@hidden>
  • Date: Thu, 16 Mar 2006 10:09:02 +0100

Corbin is correct you don't have to worry about manipulating the array in
the data source as the table won't reload while your code runs. In fact in
most cases you will have to explicitly tell it [myTableView reloadData].
What you have to watch out for (and from your description what is happening)
is the selection in the table before changing its data, make sure to
deselect any rows that will no longer be within range of the new array.
Throw a [myTableView deselectAll:self]; before [self
setArrayFromWhichDataIsTaken:newArray]; and you will see your problems
disappear.

Conor Dearden
http://www.bruji.com/


 _______________________________________________
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

  • Prev by Date: Re: Implementing URI/URL resolver - not helper
  • Next by Date: MultiDocument application and Recent Files in Trash Directory
  • Previous by thread: Re: Changing NSTableView DataSource without glitching
  • Next by thread: KVO and Coredata/Undo Clarification
  • Index(es):
    • Date
    • Thread