Using NSArrayController with a complex, heterogeneous model
Using NSArrayController with a complex, heterogeneous model
- Subject: Using NSArrayController with a complex, heterogeneous model
- From: Rick Mann <email@hidden>
- Date: Fri, 16 Jan 2015 20:58:26 -0800
I'm working on a specialized CAD program with a fairly complicated model, not using Core Data. The data is hierarchical in nature, but not homogeneously.
A "Part" in my app has a set of geometric primitives, and a set of labels (both have a common base class). These are two separate sets (arrays) on the part. But when editing the part, they can each be clicked on and edited. I want to use an NSArrayController to manage the selection, but I'm not sure of the best approach.
Should I create a new property, a read-only array, that is generated on the fly as the union of the two above sets?
In a different document/view, a part is a single entity whose geometry cannot be separately manipulated (although the labels can be moved around). I can imagine a few ways to handle this. I only mention it as a note to keep in mind.
Further complicating matters is a need for an inspector palette (like IB's) that reflects the state of the current selection (with stacked views for various subclass properties).
Suggestions?
TIA,
--
Rick Mann
email@hidden
_______________________________________________
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