1
############################################
2
# TKSCILAB Gui Interface facility for Scilab
3
# Bertrand Guiheneuf - 1998
4
############################################
10
######################################################################################
11
proc GetField { handle field } {
12
# This the procedure called when get(...) is invoked by Scilab
13
# There is a simple default behaviour when there is no
14
# a default behaviour when there is no
15
# specific get function associated to $field
16
# it just returns the value of the field
20
set name $Win($handle);
24
set KnownFunc { value };
26
# is it an implemented?
27
set idx [lsearch $KnownFunc $field];
31
# call the specific getfield
37
if ([info exists "$name\($field)"]) {
38
return [set "$name\($field)"];
54
proc Getvalue { name } {
55
# return the value field of a control
56
# when the control is a listbox, retruns a string
57
# 'idx1|idx2 ...' where idx1, .. are the indexes of
62
set style [ set "$name\(style)"];
63
switch -exact -- $style {
67
set path [ set "$name\(path)"];
68
set sel [$path.list curselection];
70
for {set i 0} {$i< [llength $sel]} {incr i} {
71
set current [lindex $sel $i];
80
if ([info exists "$name\(value)"]) {
81
return [set "$name\(value)"];
b'\\ No newline at end of file'