AW: [R-gui] Re: XML specifs for R GUIs dialog boxes

TB thomas.baier@kirchnersoft.com
Wed, 27 Nov 2002 11:54:39 +0100


> A couple of ideas from the peanut gallery:
> 
> Why not use HTML forms syntax when this is possible?  This would make
> things
> simpler for folks who already know HTML.
> 
> Alternatively,
> 
> Has anyone taken a look at XForms specification that the W3C has been
> working on?  Since they have been working on a general method for
> handling
> forms, we may be able to borrow some of what they have done.

Just a very simple question (could't get into this interesting 
discussion before -- sorry for that): Why not use HTML itself? It
provides both formatting language and visual editors (to which extent
they are usable is just another point ;-) and is a well-known language.

In addition to this, I think, finding some widget rendering HTML itself
should be possible for most (all?) platforms. This could minimize work
while still providing the most functionality. Of course, this would also
allow to use some platform-specific extensions (e.g. Active X controls
on the Windows platform) available for the supported "browser widget".

Obviously, the problem of calling R functionality from a form (in a portable
way) has to be solved, as well as transferring data to/from the form/dialog.

Maybe we could provide a solution like this:

For a simple dialog for data-entry, provide a dialog window including
an HTML component. Let's define some additional buttons like "OK", "Cancel",
"Help" etc. (maybe configurable) which will connect to some R function.

When one of the buttons is pressed, the associated function (action) will be
called.

The action then can either close the window (normal dialog behaviour) or do
some data validation or whatever else (display help,...)

The whole user-interface itself is completely done in HTML, so you don't
have to think about supporting different widgets and so on. This has
already been done for us.

Reading and writing data should be provided either by simply initializing
all form elements handling data and reading all of them at once, or by
(if possible for all HTML widgets we can find) by directly accessing the
data values for the single elements.

I hope, I'm not too far with my idea, but this solution (at least for me)
sounds both simple for us to provide (and to agree on the functionality)
and powerful enough for even more complex user interfaces.

Thomas