Best way to bind an Inspector to iVars/Properties?
Best way to bind an Inspector to iVars/Properties?
- Subject: Best way to bind an Inspector to iVars/Properties?
- From: Gordon Apple <email@hidden>
- Date: Fri, 07 Dec 2007 10:53:16 -0600
I'm currently wrestling with how to bind inspector components to the
variables of an object. I'm also becoming a Talmudic scholar of the Sketch
example, although my architecture is substantially different. (I have to
actually understand it, not just use it.)
My Shape objects are not based on subclasses, but on a highly variable
list of properties. Structs are currently stored as NSValues, which made
for easy archiving until I started trying to use keyed archivers. That and
other issues have brought up the following considerations. What is the best
way to handle structs like NSRect, NSSize, NSPoint and be able to bind my
inspector to them?
1. Store as an NSValue (like I started) and use custom property accessors
to bind to the components.
2. Create my own NSObject-based classes for these structs
3. Create a proxy holder class for these structs (with accessors)
4. Store all components in my props dictionary as individual NSNumber
components
5. Store components in their own dictionary within my props dictionary
6. Give up on structs in my props dictionary and use separate iVars with
component accessors (i.e, the Sketch approach)
7. Something entirely different
8. Find a new career which pays better with shorter hours
Any thoughts or experiences?
_______________________________________________
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