[R-gui] Another R-GUI

Philippe Grosjean phgrosjean@sciviews.org
Tue, 26 Nov 2002 13:49:44 +0100


Peter Dalgaard [p.dalgaard@biostat.ku.dk] writes

>Consider inserting a word at the beginning of line 399 in a text
>widget: It's not all that important whether you do it with

>  tkinsert(txt, "399.0", "word")

>or with (say)

>  txt$insert(399,0,"word"),

>but you really don't want to do
>
>  function(df) {
>    df$text[399] <- paste("word", df$text[399])
>    df
>  }

>The important thing (as Duncan TL has been trying to ram down our
>throats for quite a while for inter-language interfaces) is to let
>data as far as possible stay on one side of the interface.

OK, I accept this argument, but if you have to add a word in line 399 in a
text widget, then you probably do not have a dialog box,... but a text
editor! This is definitely a different matter.

However, controlling the dialog box directly from within the calculation
kernel limits its use for modal dialog boxes only, because if you trigger a
long calculation, this will freeze any non-modal dialog box in a very
unpleasant way... Is it correct or not? If yes, transferring a reasonable
amount of data (corresponding to most usual dialog boxes) back and forth
between the GUI and the calculation kernel appears to me to be a minor
problem in regard with the freedom you got by decoupling the GUI events with
the calculation kernel as much as possible (i.e, non modal dialog boxes that
keep responding anytime).

Indeed, both approaches have pros and cons. So, would it be possible to
offer both mechanisms, that is currently, something like the Thomas approach
of search-replace in submitted strings in one hand and the use of callbacks
with stronger interactions, as used in the tcltk package? Again, we fall in
a two-stages implementation: (1) simple grid layering with limited and non
expandable, but highly specialized widgets and simple search-replace
mechanism for submitting code and (2) a more sophisticated layering system
with a larger (expandable) range of low level and higher level widgets and
closer interaction with the claculation kernel through callbacks passing
only changed data back and forth?

Philippe