NSArrayController for unordered collection (non-array)
NSArrayController for unordered collection (non-array)
- Subject: NSArrayController for unordered collection (non-array)
- From: Bob Peterson <email@hidden>
- Date: Sun, 26 Dec 2004 18:11:17 -0500
I have a fixed-order collection of items for the user to see and edit.
The user cannot change the order of items, but NSArrayController seems
to be designed for just this.
MMalcolm's page has an example of a filtered array controller, but it
doesn't override methods like insertObject:atArrangedObjectIndex:. Is
it proper to subclass NSArrayController and tell it to ignore the index
value for inserts and just add the new object into its natural
position?
Related to this is the content array. My model is more naturally an
NSSet of uniquely keyed objects, whose display order is irrelevant to
the model. All these messages that specify indexes bother me. I'd
rather be passing objects or object keys around. But unless someone
has an NSSetController I don't know about, I expect I'll have to
subclass NSArrayController and use an array instead of a set.
Am I reading these documentation pages right, or do I need to set aside
the eggnog and RTFM harder?
\bob
_______________________________________________
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