update doesn't seem to work with scale 
Author Message
 update doesn't seem to work with scale


In the following example I'm trying to get a scale to run a command without
slowing down the slider motion. I'm using update within the command's loop,
and using a global variable to prevent more than one instance of the command
from running at a time, but the slider still freezes up. Does anyone know
why, and how I can get around it? BTW I'm using tcl8.2 and I've tried in on
Windows98 and HPUX.

thanks in advance.

# create and pack scale
scale .s -command {command1}
pack .s -fill y

#diagnostic output file
set output [open output.txt w]

set working N

proc command1 {args} {
  global working j output
  if {$working} {
    # already working, so don't do anything
    puts $output "already working"
  } else {
    set working Y
    # do something in a loop
    for {set j 0} {$j < 1000} {incr j} {
      puts $output "working, $j"
    set working N



Mon, 01 Apr 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. expect's full_buffer doesn't seem to work

2. Compile Tcl/tk but doesn't seem to updated my system

3. set VIDEO_MODE_RESTRICTION=CGA doesn't seem to work

4. ios.gets doesn't seem to work as advertised

5. setting LD_LIBRARY_PATH doesn't seem to work?

6. proc doesn't seem to work in NASM

7. Micro Focus CALL-CONVENTION 8 doesn't seem to work

8. Adagide install doesn't seem to work?

9. Temporarily changing error_reporting()...doesn't seem to work

10. problem with exec: import doesn't seem to work

11. ldap.modify_s doesn't seem to work

12. scale doesn't show up with update idletasks


Powered by phpBB® Forum Software