Re: Inspector window
Re: Inspector window
- Subject: Re: Inspector window
- From: Mike Ferris <email@hidden>
- Date: Tue, 22 Mar 2005 07:46:43 -0800
In an extensible system where, for example, plugins could add new
inspectable objects then I actually like a hybrid approach.
Support a nice, automatic property-sheet style inspector as you
described, but allow for classes to supply more tailored UI. This way
the bar for adding plugin types is not so high, you are not
autmatically on the hook for providing a whole custom inspector if you
write a plugin, but if you do, it will be that much better. And, of
course, the builtin types can have nice tailored inspectors.
Mike Ferris
You just take an NSTableView and fill up the entire window. Then you
have NSMutableDictionaries in every object
in your application containing it's properties and their values. And
you just list them in that window with cocoa bindings.
Would that suck real hard or would it indeed work? I'm just thinking
a little of the design of my application right now,
so I haven't tested any of this yet.
UI-wise it would suck. Programming-wise it would work.
The best approach I've found so far (and the one I'll be trying soon
in one of my projects) is to have a special "inspector protocol" that
inspectable objects have to adopt. The methods in this protocol can
return a view to display in the editor, call a method to display/apply
the values etc.
If all objects have a certain shared set of properties you can even
use dictionaries to hand them back and forth between inspector and
your object, but I'd use a manually designed UI for editing these
properties. You could even support multiple selections by merging two
such dictionaries and setting all differing properties to a special
"mixed" indicator object.
_______________________________________________
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