File: TK_EvalStr.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (41 lines) | stat: -rw-r--r-- 1,398 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
TK_EvalStr        Fractales Group        Scilab Function         TK_EvalStr
NAME
   TK_EvalStr - Evaluate a string whithin the  tcl/tk interpreter
  
CALLING SEQUENCE
 TK_EvalStr(str)
PARAMETERS
 str   : string or vector of strings, contains the tcl/tk instructions 
       
DESCRIPTION
   This routine allows to evaluate tcl/tk  instructions with the tcl/tk
  interpreter launched with scilab.   When tcl/tk support is enabled in
  scilab, you can evaluate tcl/tk expression from scilab interpreter. In
  fact, scilab launches a slave tcl/tk interpreter. The scilab instruction
  TK_EvalStr() can be used to evaluate expression  without having to write
  a tcl/tk in a separated file (this is done using  TK_EvalFile). 
  
AUTHOR
   Bertrand Guiheneuf 
  
EXAMPLE
 //with one call
 TK_EvalStr(['toplevel .foo1'
    'label .foo1.l -text ""TK married Scilab !!!""'
    'pack .foo1.l'
    'button .foo1.b -text close -command {destroy .foo1}'
    'pack .foo1.b'])
 
 //step by step (debugging)
 TK_EvalStr('toplevel .foo2');
 // creates a toplevel TK window. 
 TK_EvalStr('label .foo2.l -text ""TK married Scilab !!!""');
 // create a static label
 TK_EvalStr('pack .foo2.l');
 // pack the label widget. It appears on the screen.
 text='button .foo2.b -text close -command {destroy .foo2}';
 TK_EvalStr(text);
 TK_EvalStr('pack .foo2.b');
SEE ALSO
   ScilabEval, TK_EvalFile, TK_GetVar, TK_Setvar