guiGetValue: Getting and Setting Values

Description Usage Arguments Details Examples

View source: R/widgets.R

Description

guiGetValue and guiGetAllValues are used for getting the values of the objects that you created. This is useful to make more customized responses to user inputs.

The guiGet and guiSet routines get at more internal code to the interface. In particular guiSet can set some internal constants.

Usage

1
2
3
4
5
6
7
guiGetValue( i )
guiGetAllValues()
guiSetValue( i, value )

guiSet( x, value )
guiGet( x, mode="any", ifnotfound=NA )
guiGetSafe( x, ifnotfound=NA )

Arguments

i

Which item in the list to return. If a string, the name of the corresponding arg. If numeric, the index to the arg.

x

String to represent the object. See examples below for constants.

mode

See mode; returns results corresponding only to a certain type of object, such as numeric.

ifnotfound

Value to return if not found.

value

Value to set in the namespace.

Details

guiGetAllValues returns a list of all values of objects created, versus just one specific value. Values are returned as strings, or numeric, depending on the value (it attemps to convert everything to numeric, on failure, returns the string).

guiSet can be used to set values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
values <- guiGetAllValues()
value1 <- guiGetValue(1)

## End(Not run)

## Not run: 
## These are the constants that you can modify
##  to change the way things are displayed.
guiSet( "SLIDER_LENGTH", 500 )
guiSet( "ENTRY_WIDTH", 40 )
guiSet( "LIST_HEIGHT", 15 )
guiSet( "LIST_WIDTH", 15 )
guiSet( "EDIT_WIDTH", 65 )
guiSet( "EDIT_HEIGHT", 5 )

## End(Not run)

fgui documentation built on May 2, 2019, 3:37 p.m.

Related to guiGetValue in fgui...