Re: How to make this program work?



First of all, thanks for your reply. As noted, I am a newbie, so
please be patient with me as I learn how to program in TCL.
I will try grid instead of pack.

Don't use pack -- use grid.

I wasn under the impression that "global" is a declaration that the
spep]cified variable is then good for use in main as well as in proc.
My bad. So how can you pass a value generated by $variable to main?

Ok, I'll try llength. Yes I forgot the -command syntax as part of that
line. I'll fix that next. I wanted to get instant count when I clicked
the box, instead of waiting for the "after" to finished, whihc in my
case maybe minutes later.

Suggest instead of exec ls ... you use llenght and glob.  Also there is no
command associated with the button - so why use a button???


Yes, this definitely error out. So I tried out the pack command
because I thought it will re-display with the new "count". But alas, I
don't know how to update teh active display with the new count. My
only book, bu Ousterhout, is not clear to me on how to pass my
variable value to an existing display.

This will error since the command .count$dir already exists!

      puts $count

      pack .this$dir .count$dir -side left -fill x -fill y

These are already displayed, why the pack command?


So again, how do you pass /update an existing value with a new one?


Since this is getting called via update, the return value is thrown away.


I agree. I am learning and hope to get better with TCL. I think it is
a great way to do GUIs as it supports making GUIs easily. Thanks for
your patience.


All in all, you seem really messed up as to what you want to do and how to
do it.
.


Loading