s-news
[Top] [All Lists]

Help in extending the user interface

To: s-news@lists.biostat.wustl.edu
Subject: Help in extending the user interface
From: H.Gao@herts.ac.uk
Date: 14 May 2004 12:20:49 +0100
Dear S users,

I am using SPLUS 6 for window. I want to create dialogs containing selective options for input variables. Some problems are encountered and I hope to get help from you.

My function looks like:
xTML.gauss <- function(X, y, alpha = 5, otp = c("adaptive", "fixed"))
{
if (opt==fixed){
   z <- X+y
} z } I tried to create dialog box and invoke with menu items (or toolbar) for this function, where the variable "otp" can be selected from a drop down list. But I could not get success. Furthermore, all the original dialog invoked with menu items changed into a simple dialog with only input box for each variable, which is similar as the dialog created by the following Program:

guiCreate(classname="MenuItem",
Name="$$SPlusMenuBar$MyStats$XTML",
Type="MenuItem", MenuItemText="&xTMLgauss...",
Action="Function", Command="xTML.gauss")

Does anybody know how to do this correctly and how to get the original dialog back?

I tried the following but it does not work.
guiCreate(classname="Property", Name="XTML",
Type="Normal", DialogControl="List Box",
DialogPrompt="otp", OptionList=c("adaptive", "fixed"),
DefaultValue="adaptive")

Thanks in advance,
Haiyan Gao


<Prev in Thread] Current Thread [Next in Thread>