• 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
NSComboBox and sorted list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSComboBox and sorted list


  • Subject: NSComboBox and sorted list
  • From: Frédéric Testuz <email@hidden>
  • Date: Fri, 18 Apr 2014 13:32:07 +0200

Hello,

I have a typical CoreData application which display my entities in an NSTableView with an NSArrayController and a panel to edit the selected item.

I have an entity Book with a NSString attribute type displayed in an NSComboBox. I want the drop down list of the combo box to display the previously chosen types. I have an NSArrayController bind with the Book entity and the managed object context.

I can make it works by binding the NSComboBox :
Content (or Content Values) -> email@hidden
Value -> BookArrayController.selection.type

Until this point all is well, but I want the list to be sorted. So I think I have to add a NSArrayController which will maintain the sorted list of types. I try this :

TypeListArrayController :
Content Array -> email@hidden

NSComboBox :
Content -> TypeListArrayController.arrangedObjects
Value -> BookArrayController.selection.type

But with this setting, when I open my document (when the window is displayed) it takes a looooooooong time. More than 10min when at first it takes 1s. I check by stopping in the debugger, the stack frame is more than 38000 with huge recursivity.

Is there a solution with NSArrayController and binding or I have to implement a data source for the combo box manually ?

Frédéric
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: NSComboBox and sorted list
      • From: Frédéric Testuz <email@hidden>
  • Prev by Date: Strange toolbar/view/resize cursor interaction
  • Next by Date: Re: Layout-triggered animation
  • Previous by thread: Re: Strange toolbar/view/resize cursor interaction
  • Next by thread: Re: NSComboBox and sorted list
  • Index(es):
    • Date
    • Thread