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) -> 
bookarraycontroller.arrangedobjec...@distinctunionofobjects.type
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 -> 
bookarraycontroller.arrangedobjec...@distinctunionofobjects.type

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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to