• 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
Possibly dumb NSTableView problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possibly dumb NSTableView problem


  • Subject: Possibly dumb NSTableView problem
  • From: rob colonna <email@hidden>
  • Date: Sun, 1 Apr 2007 11:37:06 -0400

Hello.

Hopefully this question isn't so basic as to waste anyone's time.

I'm using the selection in one NSTableView to control the contents of another, and it's working quite well except for one thing. I'm using the delegate method tableViewSelectionDidChange to notify the program of a change in the first table, causing it to update the second table. What I've run into is that if I am toggling between two collections of things in the first table, one, with say, 10 items in the second, another with 20, there's something I'm missing that causes NSArray objectAtIndex to be looking beyond its highest index. So, if i have item 11 selected, and then switch to the collection with only 10 items, it complains. I've pretty thoroughly rooted out anything that might conceivably be tied to it, and I flush all that out on tableViewSelectionDidChange, which I've verified to complete successfully. Is there anything I might be missing that happens after the delegate method executes, but before the NSTableViews are updated? Or is it more likely that there lurks something in my code that's still referring to an item 11 selected, out of a possible 10?

Thanks,
rob colonna





rob colonna
---------------------------------------------------------------------
SpendThrift | Personal finance without the hassle
http://blackllamafaction.org/spendthrift/
_______________________________________________

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


  • Follow-Ups:
    • Re: Possibly dumb NSTableView problem
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: The how and why of Cocoa.
  • Next by Date: Re: NSTableView + NSArrayController: How to revert to 'natural' sort order?
  • Previous by thread: Re: NSTokenField come over a NSTableView
  • Next by thread: Re: Possibly dumb NSTableView problem
  • Index(es):
    • Date
    • Thread