Dear Neil,

You may want to look at my iWidgetsRGtk package (
http://www.math.csi.cuny.edu/pmg). There is a function called igenericwidget
that implements most of what you want. The difference being that the
function is evaluated when a button is clicked. If I were implementing your
request in that style I'd try the following.


Adding a handler to the mix is really quite easy using Simon Urbanek's
iwidget style. The basic structure could be something like this:

## Your handler, just give the name of the function to call below
theHandler = function(h,...) {
   argList = list()
   for(i in names(h$action)) { # a list of your widgets
      argList[[i]] = get.value(h$action[[i]])
  }
 do.call(youSpecialFunction, argList)
}

## now set up the widget. Container to hold the widgets
group = igroup(horizontal=FALSE, win=iwindow("My special widget",
visible=TRUE)

widgetList = list()
for(i in parseFunctionReturnInstructionsToMakeWidget) {
  widgetList$i = switch(i, ...)  ## returns an iWidget instance eg. islider,
iradio, ispinbutton, ...
  add(group, widgetList$i)
}
for(i in names(widgetList))
  addhandlerchanged(widgetList[[i]], handler = theHandler,
action=widgetList)

From here you just need to add in your parseFunction... routine and you
should be good to go. The switch() function would make use of the iwidgets
such as iradio, itext, islider, ...

--John

	[[alternative HTML version deleted]]

