[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Frmework or Kit for Inspector

From: Stefan Urbanek
Subject: Re: Frmework or Kit for Inspector
Date: Tue, 14 Feb 2006 09:11:56 +0100
User-agent: Internet Messaging Program (IMP) 3.2.2

Citát Guilhem BONNEFILLE <>:

> On Mon, 13 Feb 2006 17:42:48 +0000
> Richard Frith-Macdonald <> wrote:
> > My understanding of the term 'inspector' does not refer to an  
> > application, but rather to a panel within an application, which lets  
> > you look at some information and (usually) change it.  Because the  
> > things being inspected vary wildly, the contents of an inspector  
> > generally vary a lot, and about the only thing co0mmon to all  
> > inspectors is that they reside in panels ... for which we have the  
> > NSPanel object.
> > 
> > Maybe you could describe what you think a generic inspector should do?
> I'm a GNUStep beginner, I'm surely wrong.
> It seems that an inspector have a special design: a drop-down menu at
> the top (replaced in nowadays GUI by tabs) and corresponding widgets
> below a rule.
> What I expect, is something that allow me to concentrate only in the
> parts below the rule (just call these parts specific parts).
> I imagine a GSInspector where I register, at the init time, all the
> specific parts.
> Next, when the user select an object, I only have to inform the
> GSInspector about the object selected. The GSInspector does itself all
> the job to select which specific parts whould be available now and which
> should be hiden. Perhaps, something else should be precised at the
> register time in order to allow such selection (a class or protocol). Or
> perhaps the selection could be done via introspection.
> Is it insane idea?

I have few inspector related classes already implemented, they are:

EKInspector - controller object implementing functionality of one inspector
EKInspectorPanel - panel with pop-up button for switching inspectors
EKFocus - focused object

- create EKInspector subclasses
- implement - (NSArray *)inspectorIdentifiers; in objects you are going to
- register EKInspector subclasses with proper identifiers
- connect appropriate menu items to showInspector: action of NSApplication

When you select an object, just do:

  [[EKFocus sharedFocus] setObject:selectedObject];

and everything else is handled automatically: inspector panel is notified, it
asks for 

There is some older implementation here:

(see the EK* classes inside)

The inspector mechanism would be much nicer and simpler when we had
Key-Value-Observing implemented ...

Anyway, enjoy what is already present.

Stefan Urbanek

(*) EK means Environment Kit

First they ignore you, then they laugh at you, then they fight you, then
you win.
- Mahatma Gandhi

reply via email to

[Prev in Thread] Current Thread [Next in Thread]