Table View not updating correctly
Table View not updating correctly
- Subject: Table View not updating correctly
- From: Matt <email@hidden>
- Date: Mon, 18 Dec 2006 22:30:04 -0500
For those that are interested, my problem was that I had a table view
that wasn't showing the updated selectionIndex. I could call the -
setSelectionIndex on the array controller, as well as tons of other
methods, including working with the table itself and trying
setNeedsDisplay on the view. Of note was that the controller's index
was being updated, but it wasn't apparent in the interface.
After all of that work, I ran across a solution. I was trying to
change the index in the controller in my -insertBookmark
inBookmarksArrayAtIndex method. I suppose the table/controller
doesn't like to be told to change it's current selection while in the
midst of trying to add an object to the array, whether I actually add
one or not.
The whole purpose of the exercise was to alert the user he was trying
to add a duplicate object and highlight the previous one. Simply
setting the selectionIndex in another method outside of the insert
method works as it should.
Hope that helps someone else out there!
Matt
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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