Re: gui builder issues?

Emiliano Heyns <[email protected]> Fri, 23 Jan 2004 10:39:40 +0100
Newsgroups gmane.comp.java.xwt.widgets
Message-ID <[email protected]>
On Thu, Jan 22, 2004 at 11:23:09PM -0800, Tupshin Harper wrote:
> I've been comtemplating what issues there might be in creating a gui 
> designer in XWT.
> 
> One question which I don't see an answer to, is whether there is a way 
> to enumerate all widgets loaded into the app (core widgets plus any 
> loaded from the xwar or dynamically at runtime).

The first problem would be to define what constitutes a widget in the
first place. In any XWT (ibex?) app, there's going to be many templates
that the user won't think of as a widget (since it'll have a single
purpose, like a specific pane grouping widgets to form the app gui) but
that could technically be used as such.

Maybe we should explicitly mark widgets? An attribute on the toplevel
that has no purpose but to identify it as an entity meant to be
presented as a widget in a gui builder?

> The followup is whether it is possible to enumerate all properties, 
> traps, etc., of those widgets.

You'll know that better than I do. When instantiated you could easily
enumerate properties (a JS object is just an array after all), but I
don't know if you can distinguish between properties and methods and
traps, and I don't know if you can/should instantiate a widget just to
inspect it.

Maybe here too it'd be worthwhile to not rely upon reflection but
explicitly document what the UI builder can use, and how.

-- 
Emiliano