need help with creating dynamic tcl displays


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need help with creating dynamic tcl displays
# 1  
Old 10-24-2008
need help with creating dynamic tcl displays

I'm fairly new to tcl scripting and could use a little help. I have a simple list file that will be of unknown size (somewhere between 10 to 20 names). I'd like to create a gui that has a checkbutton for each name in the list and a single action button that will do something for all the checkboxes that have been selected.

Here's what I have as well as what I need...

------------------------------------------------------------------

frame .one
foreach person {some way to read the list file and create the list here}
set lower [string tolower $person]
checkbutton .one.$lower -text $person -variable $person
pack .one.$lower -side top -anchor w
}
pack .one -side top

frame .action
pack .action -side bottom
button .action.do_it -text "Do it" -command do_it
button .action.quit -text "Quit" -command quit
pack .action.do_it .action.quit -side left

proc do_it {} {
foreach person {same list as above}
set lower [string tolower $person]
if {variable for check box for this person}
puts "$person was selected. Some action will be taken"
exec some action will be taken here
}
}
}


- I need some way to read in the file and populate the foreach list.
- I also need to be able to determine it a checkbox has been selected and take some action.


I'll take any help or suggestions you can offer.

Thanks in advance...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Creating Dynamic Variables from a Flat File

Greetings all, Been trying to do my Googling and forum searches but can't seem to lock in on a solution. I have a script that parses a log and collects all the uniq events to a flat file. Some days might have 50 unique events, other days might have 75. (Hence my reference to dynamic.) ... (2 Replies)
Discussion started by: sjrupp
2 Replies

2. Web Development

MYSQL: Creating Dynamic Table Names 5.1

Hey everyone. Thanks for looking at this. I'm trying to create a table with the dynamic name of TableName + today's date. My variables are all happily created but the system chokes when I try to create the new table name example: Set @BFBW = CONCAT("BFBW", CURDATE()); Select @BFBW; ... (2 Replies)
Discussion started by: Astrocloud
2 Replies

3. Shell Programming and Scripting

Creating Dynamic Input or daa files

Hi, I got a requirement to automate the process. We have SLA files, there are some 80 SLA files comes from 1.30pm - 5.30pm. I was asked to write a script to check for the SLA files in the load directory, if the files come then we got to send the mail to the group, if the mails doesnt come... (1 Reply)
Discussion started by: afahmed
1 Replies

4. UNIX for Advanced & Expert Users

Sql dynamic table / dynamic inserts

I have a file that reads File (X.txt) Contents of record 1: rdrDESTINATION_ADDRESS (String) "91 971502573813" rdrDESTINATION_IMSI (String) "000000000000000" rdrORIGINATING_ADDRESS (String) "d0 movies" rdrORIGINATING_IMSI (String) "000000000000000" rdrTRAFFIC_EVENT_TIME... (0 Replies)
Discussion started by: magedfawzy
0 Replies

5. Shell Programming and Scripting

Creating a dynamic case statement

I'm using the korn shell and trying to create a case statement from the contents of a file that is changed regularly, each line of the file has three fields, eg track1 202.111.111.111 99 room7 222.111.222.333 76 I'm using awk to select each variable. I've been unable to figure out how to... (5 Replies)
Discussion started by: squrcles
5 Replies

6. UNIX for Dummies Questions & Answers

Creating a file that contains output from a command, and then displays itself

hey, I'm trying to create the command that will create a file named user.txt that contains the output of the command cut -d: -f1,5 /etc/passwd, and displays itself afterwards. I don't know how to bridge cat > user.txt with cut -d: -f1,5 /etc/passwd, or how display it afterwards. Any help would... (2 Replies)
Discussion started by: raidkridley
2 Replies

7. Programming

Creating an array to hold posix thread ids: Only dynamic array works

I am facing a strange error while creating posix threads: Given below are two snippets of code, the first one works whereas the second one gives a garbage value in the output. Snippet 1 This works: -------------- int *threadids; threadids = (int *) malloc (num_threads * sizeof(int)); ... (4 Replies)
Discussion started by: kmehta
4 Replies

8. Shell Programming and Scripting

creating a dynamic array

i want to create an array the array elements are populated depending upon the number of entries present in a data file The data file is created dynamically how to achieve the same thanks (1 Reply)
Discussion started by: trichyselva
1 Replies

9. Shell Programming and Scripting

creating dynamic shell script

Hello I am trying to create a dynamic ksh script and I have an issue. I have a script a.ksh and it has got the following lines (for example) #!/bin/ksh # trace mode +x : without trace -x : with trace set +xv echo hi, i am going to create a dynamic script now cat >> dynamic.ks <<EOF... (2 Replies)
Discussion started by: sundarkumars
2 Replies

10. Shell Programming and Scripting

creating a dynamic array in ksh

Hi, Is it possible to create a dynamic array in shell script. I am trying to get the list of logfiles that created that day and put it in a dynamic array. I am not sure about it. help me New to scripting Gundu (3 Replies)
Discussion started by: gundu
3 Replies
Login or Register to Ask a Question
PYFORMEX(1)						      text and X11 processing						       PYFORMEX(1)

NAME
pyformex - generate and transform 3D geometry using Python scripts SYNOPSIS
pyformex [options] [ [ file [args] ] ...] DESCRIPTION
This manual page documents briefly the pyformex command. pyFormex is a program for generating, transforming and manipulating large geometrical models of 3D structures by sequences of mathematical operations. Thanks to a powerful (Python based) scripting language, pyFormex is very well suited for the automated design of spatial frame structures. It provides a wide range of operations on surface meshes, like STL type triangulated surfaces. There are provisions to import medical scan images. pyFormex can also be used as a pre- and post-processor for Finite Element analysis programs. Finally, it might be used just for creating some nice graphics. Using pyFormex, the topology of the elements and the final geometrical form can be decoupled. Often, topology is created first and then mapped onto the geometry. Through the scripting language, the user can define any sequence of transformations, built from provided or user defined functions. This way, building parametric models becomes a natural thing. While pyFormex is still under development, it already provides a fairly stable scripting language and an OpenGL GUI environment for dis- playing and manipulating the generated structures. OPTIONS
The pyformex command follows the usual GNU command line syntax, with long options starting with two dashes ('-'). The non-option arguments are filenames of existing pyFormex scripts, possibly followed by arguments, that will be executed by the pyFormex engine. If a script file uses arguments, it is responsible for removing the arguments from the list. A summary of the most important options is included below. A complete overview is can be found from the 'pyformex -h' command. For a com- plete description of the use and operation of pyFormex, see the online documentation at http://pyformex.org/doc or the documentation included with the distribution. --gui start the GUI (default if no file argument is given) --nogui do not load the GUI (default if a file argument is given) --interactive, -i Go into interactive mode after processing the command line parameters. This is implied by the --gui option. --config=<file> Read configuration settings from <file>, if it exists. --nodefaultconfig Skip the default site and user config files. This option can only be used in conjunction with the --config option. --redirect Redirect standard output to the message board (ignored with --nogui) --debug display debugging info to standard output --whereami Show where the pyformex package is installed and exit --detect Show detected helper software and exit --version Show the program's version number and exit. --help, -h Show the help message and exit. SEE ALSO
http://pyformex.org/doc/ AUTHORS
pyFormex is developed by Benedict Verhegghe with the help of the other pyFormex project members: Gianluca De Santis, Francesco Iannaccone, Peter Mortier, Tomas Praet, Sofie Van Cauter, Wenxuan Zhou. AUTHOR
Benedict Verhegghe <benedict.verhegghe@ugent.be>. This manual page was written for the Debian project (and may be used by others). COPYRIGHT
GPL v3 or higher 0.1 2011-12-29 PYFORMEX(1)