nscl_logo_small.gif (2463 bytes)

ParList - SpecTcl Script

HH00706_.wmf (6530 bytes)

SpecTcl Home  General Information User Guide Programmer's Guide Obtaining and Installing

Syntax

ParList parameter-definition-list

Synopsis

Lists parameter definitions in a 'nice' formatted way.

Detailed Description

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.

Examples:

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.

Top

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