• 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
Ideas for multi-type inspector design
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ideas for multi-type inspector design


  • Subject: Ideas for multi-type inspector design
  • From: Mads Paulin <email@hidden>
  • Date: Tue, 15 Dec 2009 19:40:13 +0100

Hi All,

I am trying to make an inspector like panel for my application and could use some input on the design of that.

My application has an NSOutlineView displaying objects of multiple types. These objects are stored in an NSTreeController. Now, I would like to have an inspector panel show some attributes for the object selected in this NSOutlineView. The set ob attributes to be displayed/made editable via the inspector depends on the type of object selected - essentailly the same as e.g. InterfaceBuilder is doing when different elements in a NIB file is selected.

I am able to get the infrastructure of the inspector up and running and also able to make a NIB file and an NSWindowController subclass for each object type to go into the inspector. Where I need some input is on how to determine which of these controllers are activated when the selection in the OutlineView changes so that the correct NIB can be swapped into the inspector window ?

- One solution is to hold a dictionary mapping some kind of type-id to the appropriate WindowController-pointer. Surely this is not a nice solution as this dict must be changed when new types are created in later versions of the app - either manually or by a bundle-loading-like approach.

-Also, the dataobjects should not "know" about their respective inspector-panel/controller as this will violate the MVC pattern.

Any ideas or thougts are greatly appreciated.

Thanks,
Mads_______________________________________________

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

  • Prev by Date: Re: iPhone Testing Internet Connection?
  • Next by Date: Error on third opening of preferences window
  • Previous by thread: Ideas for multi-type inspector design
  • Next by thread: Ideas for multi-type inspector design
  • Index(es):
    • Date
    • Thread