GuidoSSIOption
Overview
The GuidoSSIOption command allows you to both get and set standard option specifiers that exist on the server. Most option specifiers are loaded by the software from the SSI_ETC:defaults.ssi file but they can also be created and deleted at runtime. See the SclSystemOption command for further information.
Synopsis
GuidoSSIOption get optionName
GuidoSSIOption set optionName value
Description
The first form of GuidoSSIOption will retrieve the value of the given SSI option name. The second format allows you to set the given SSI option on the server to the value you provide.
Arguments
get Sub-function to GuidoSSIOption that indicates an option value is to be retrieved
set Sub-function to GuidoSSIOption that indicates an option is to be set to the given value
optionName Option name identifies the option to be retrieved or set. If the option doesn't exist then an empty string will be returned for a get operation or it will be created and set to the value for a set operation.
value Value is the actual value that the option will be set to.
Examples
Example 1
The example form below contains a button that will call a form procedure that will make use of the GuidoSSIOption function to both get and set some options from/to the server.
# GuidoSSIOption Example 1
# define the form
set formDef {
# a form proc to test GuidoSSIOption
proc runGuidoFunction {} {
# retrieve a standard option
set distanceUnits [GuidoSSIOption get "distance units"]
puts "Distance units are $distanceUnits"
# create a user option and the retrieve it
GuidoSSIOption set "My Personal Option" "Secrete script developer info"
set msg [GuidoSSIOption get "My Personal Option"]
puts $msg
}
GuidoForm form {
-label "Using Menu Components"
-default_buttons
-layout BoxLayout Y_AXIS
GuidoFiller fil1 {
-height 1
}
GuidoButton goButton {
-caption "Press for some action"
-width 25
-action valueChanged {[runGuidoFunction]}
}
GuidoFiller fil1 {
-height 1
}
}
}
# Create and run the form
SclCreateGuidoForm formHandle $formDef {}
$formHandle SclRun {}
|
See Also
Guido
Dependency Callbacks
Action Callbacks
Validation Callbacks