|
GEOS SDK TechDocs
|
|
keyboard ...
|
memsize ...
load
load <file>
Load a file of Tcl commands.
-
If the file cannot be found as given, it is looked for in all the directories mentioned in the "load-path" variable. This variable is initialized from the SWATPATH environment variable, which is in the form <dir1>:<dir2>:...:<dirN>.
-
The Swat library directory is appended to this path so you need not include it yourself. The file need not end in ".tcl".
-
When searching,
file
,
file
.tcl, and
file
.tlc are searched for. If
load
finds a
file
.tlc file, that file will be used only if it is more recent than any corresponding
file
.tcl or
file
file.
loadapp
Load an application from swat. Single argument is the file name of the application to launch (application must reside in the appl subdirectory of the GEOS tree).
The application is opened in normal application mode. Note that the application will not be loaded until you continue the machine, as the loading is accomplished by sending a message to the UI.
loadgeode
Load a geode from swat. Mandatory first argument is the name of the file to load (with path from top-level GEOS directory, using / instead of \ as the path separator).
Second and third arguments are the data words to pass to the geode. The second argument is passed to the geode in cx, while the third argument is passed in dx.
Both the second and third arguments are optional and default to 0. They likely are unnecessary.
locals
locals [<func>]
Examples:
-
"locals"
- Print the values of all local variables and arguments for the current frame.
-
"locals WinOpen"
-
Print the names of all local variables for the given function. No values are printed.
Allows you to quickly find the values or names of all the local variables of a function or stack frame.
See Also: print,
frame,
info.
localwin
localwin [<numlines>]
Examples:
-
"localwin"
- Display local variables in a 10-line window
-
"localwin 15"
-
Display local variables in a 15-line window
-
"localwin off"
-
Turn off the local variable display
Turn on or off the continuous display of local variables.
-
Passing an optional numerical argument turns on display of that size. The default size is 10 lines.
-
Only one local variable display may be active at a time.
loop
Simple integer loop procedure. Usage is:
loop <loop-variable> <start>,<end> [step <step>] <body>
<start>, <end>, and <step> are integers. <body> is a string for Tcl to evaluate. If no <step> is given, 1 or -1 (depending as <start> is less than or greater than <end>, respectively) is used. <loop-variable> is any legal Tcl variable name.
map
map <var-list> <data-list>+ <body>
Examples:
-
"map {i j} {a b} {c d} {list $i $j}"
-
Executes the command "list $i $j" with i and j assigned to successive elements of the lists {a b} and {c d}, respectively, merging the results into the list {{a c} {b d}}
This applies a command string to the successive elements of one or more lists, binding each element in turn to a variable and evaluating the command string. The results of all the evaluations are merged into a result list.
-
The number of variables given in <var-list> must match the number of <data-list> arguments you give.
-
All the <data-list> arguments must have the same number of elements.
-
You do not specify the result of the <body> with the "return" command. Rather, the result of <body> is the result of the last command executed within <body>.
See Also: foreach,
mapconcat.
mapconcat
mapconcat <var-list> <data-list>+ <body>
Examples:
-
"mapconcat {i j} {a b} {c d} {list $i $j}"
-
Executes the command "list $i $j" with i and j assigned to successive elements of the lists {a b} and {c d}, respectively, merging the results into a string.
map-method
map-method <number> <object>
map-method <number> <class-name> [<object>]
Examples:
-
"map-method ax ^lbx:si"
-
Prints the name of the message in ax, from the object at ^lbx:si's perspective.
-
"map-method 293 GenClass"
-
Prints the name of message number 293 from GenClass's perspective.
Maps a message number to a human-readable message name, returning that name. This command is useful both for the user and for a Tcl procedure.
-
When called from a Tcl procedure, the <class-name> argument should be the fullname of the class symbol (usually obtained with the obj-class function), and <object> should be the address of the object for which the mapping is to take place. If no <object> argument is provided, map-method will be unable to resolve messages defined by one of the object's superclasses that lies beyond a variant superclass.
-
If no name can be found, the message number, in decimal, is returned.
-
The result is simply returned, not echoed. You will need to echo the result yourself if you call this function from anywhere but the command line.
See Also: obj-class.
mcount
mcount [<args>]
Examples:
-
"mcount"
- start the method count or print the count
-
"mcount reset"
-
restart the method count
-
"mcount stop"
-
stop the method count
-
"mcount MyAppRecalcSize"
-
count messages handled by MyAppRecalcSize
Keep a count of the methods called.
The args argument may be one of the following:
-
nothing
- start the method count or print the current count
-
'reset'
- reset the count to zero
-
'stop'
- stop the method count and remove it's breakpoint
-
message handler
-
start the method count for a particular method
See Also: mwatch,
showcalls.
|
GEOS SDK TechDocs
|
|
keyboard ...
|
memsize ...