Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 32f982eb32be1d0b6baa344d4f210972224e3941
Ticket: 218962ffffffffffffffffffffffffffffffffff
[vwait] and [variable] don't like each other
User & Date: nobody on 2000-10-26 01:08:40
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 3329 Bug
    Version: 8.2
    SubmitDate: '1999-11-05'
    LastModified: '2000-01-19'
    Severity: MED
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    OS: All
    FixedDate: '2000-01-19'
    FixedInVersion: 8.3
    ClosedDate: '2000-10-25'
    
    
    Name:
    keith lea
    
    ReproducibleScript:
    namespace eval f {
            proc unwait {} {
                variable test
        
                puts "unwaiting"
                set test 1
                puts "unwaited"
            }
        
            proc wait {} {
                variable test
        
                puts "waiting"
                vwait test
                puts "waited"
            }
        
            proc print {} {
                variable test
        
                puts $test
            }
        }
        
        after idle f::wait
        after idle f::unwait
        return
    
    ObservedBehavior:
    test.tcl is the included script..
        
        % source test.tcl
        waiting
        unwaiting
        unwaited
        % f::print
        1
        % 
        
        in other words, the [vwait] inside the [f::wait] procedure never
        returns, even though $f::test is set (as the [f::print] call states)
    
    DesiredBehavior:
    the vwait should work with namespace variables linked to local variables
        inside procs using [variable]
        
        if I edit the [vwait] to say [vwait f::test] it works. there is nothing
        in the documentation stating that vwait waits for variables on level #0.
        does it?
    
    
    
    This is a documentation failure (the vwait docs haven't changed
    since 7.5, and namespaces were added in 8.0).  vwait does require
    a globally scoped variable.  The reason for this is that we want
    to ensure that the user does not provide us a local var (that
    could never get set again).  The docs have been updated for 8.3. 
    -- 01/19/2000 hobbs
    
  4. foundin changed to: "obsolete: 8.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "07. Variables"
  10. title changed to: "[vwait] and [variable] don't like each other"
  11. type changed to: "Bug"