Calling a Tk-command

Since Tcl uses strings to communicate with the Tk toolkit, parameters to a Tk-command must be translated to strings before calling the C function which implement it. The following conversions are done, depending on the type of the parameter that STK must give to the toolkit:

symbol:
the print name of the symbol;
number:
the external representation of the number expressed in radix 10;
string:
no conversion;
keyword:
the print name of the keyword where the initial semicolon has been replaced by a dash (``-'');
boolean:
the string "0" if #f and "1" if #t
tk-command:
the name of the tk-command
closure:
the address of the closure using the representation shown in [*].
otherwise:
the external ``slashified'' version of the object.
As an example, let us make a button with a label containing the string "Hello, word". According the original Tk/Tcl documentation, this can be done in Tcl with $\Longrightarrow$
$\Longrightarrow$ unspecified error makeotherˆ`=̀13`

          gobblecrbutton .hello -text "Hello, world"
Following the rewriting rules expressed above, this can be done in STK with $\Longrightarrow$
$\Longrightarrow$ unspecified error makeotherˆ`=̀13`

          gobblecr(button '.hello '-text "Hello, world")
This call defines a new widget object which is stored in the STK variable .hello. This object can be used as a procedure to customize our button. For instance, setting the border of this button to 5 pixels wide and its background to gray would be done in Tcl with $\Longrightarrow$
$\Longrightarrow$ unspecified error makeotherˆ`=̀13`

          gobblecr.hello configure -border 5 -background gray
In STK this would be expressed as $\Longrightarrow$
$\Longrightarrow$ unspecified error makeotherˆ`=̀13`

          gobblecr(.hello 'configure '-border 5 '-background "gray")
Since keyword colon is replaced by a dash when a ndexfile(index-entry "Tk-command" "tt" aux )Tk-command is called, this expression could also have been written as: $\Longrightarrow$
$\Longrightarrow$ unspecified error makeotherˆ`=̀13`

          gobblecr(.hello 'configure:border 5:background "gray")