• 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
Best way to bind an Inspector to iVars/Properties?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Best way to bind an Inspector to iVars/Properties?
      • From: Corbin Dunn <email@hidden>
    • Re: Best way to bind an Inspector to iVars/Properties?
      • From: Jon Hess <email@hidden>
  • Prev by Date: Re: Why is the latest WebKit interacting with my NSThread?
  • Next by Date: Re: Notification for mouse-up on NSStepper
  • Previous by thread: Re: GCC Standard Predefined Macros
  • Next by thread: Re: Best way to bind an Inspector to iVars/Properties?
  • Index(es):
    • Date
    • Thread