![]() |
ParList - SpecTcl Script |
![]() |
|---|
SpecTcl Home General Information User Guide Programmer's Guide Obtaining and Installing
ParList parameter-definition-list
Lists parameter definitions in a 'nice' formatted way.
This command takes as input a list of parameter definitions and produces as output a formatted table of parameter definitions.
Sample Output:
| Name | Id | Resolution |
| Distribution1 | 0 | 10 |
| Distribution2 | 1 | 10 |
| Distribution3 | 2 | 10 |
| Distribution4 | 3 | 10 |
| Distribution5 | 4 | 10 |
| dist1+dist2 | 5 | 11 |
Since the input parameterization is the same as that created by the parameter -list command ParList is usually used in conjunction with that command.
ParList [parameter -list] ;# Produce alphabetized table.
ParList [parameter -list -byid] ;# Produce table sorted by id.
#
# The multi-line example below creates a text widget, inserts into it the
# current list of parameters sorted alphabetically and packs the widget into
# the default toplevel window
#
text .parlist
.parlist insert end [ParList [parameter -list]]
pack .parlist
#
# The multiline example below works with the previous example to update the
# contents of .parlist every second.
#
proc ParListUpdate {} { ;# Update procedure.
.parlist delete 1.0 end ;# Empty the text widget
.parlist insert end [ParList [parameter -list]] ;# Re fill with current list.
after 1000 ParListUpdate ;# Reschedule for next 1000 ms.
}
ParListUpdate ;# Start the updates.
SpecTcl Home General Information User Guide Programmer's Guide Obtaining and Installing
Last Modified: October 28, 2003 by: fox@nscl.msu.edu
© Copyright NSCL 1999, All rights reserved