TABLE OF CONTENTS
setOptions
NAME
::guib::keywordObj::setOptions -- stores the options of the ID-th keyword
USAGE
setOptions id opts
ARGUMENTS
id -- the ID number opts -- the list of option-value pairs in the "array get" style
RETURN VALUE
The option-value pairs of the ID-th keyword.
EXAMPLE
$obj setOptions [array get $options]
SOURCE
body ::guib::keywordObj::setOptions {id opts} { foreach {elem value} $opts { # do some checking for the allowed values for various options if { $value != "" } { switch -exact $elem { validate { regsub -all integer $value int vl foreach v $vl { if { ! [string match $v string] && [info procs ::guib::widgets::${v}*] == {} } { if { ! [auto_load ::guib::widgets::$v] } { ::tclu::abort "syntax error in definition file: wrong validation, $vl,\nspecified by -validate option" } } } } widget { set wid [lindex $value 0] if { [info procs ::guib::widgets::${wid}help] == {} } { if { ! [auto_load ::guib::widgets::${wid}help] } { #set allowed [info procs ::guib::widgets::*help] #regsub -all ::guib::widgets:: $allowed {} allowed #regsub -all help $allowed {} allowed ::tclu::abort "syntax error in definition file: wrong widget, $wid,\nspecified by -widget option" } } } } } set cmd($id,$elem) $value } return $opts }