|
2007-03-07
| ||
| 10:20 | • Closed ticket [1664597fff]: upvar bug plus 6 other changes artifact: dc9bdbb4a0 user: sf-robot | |
|
2007-02-21
| ||
| 07:31 | • Ticket [1664597fff]: 4 changes artifact: 6d83e6b8ad user: jenglish | |
| 04:45 | • Pending ticket [1664597fff]. artifact: 7d1a2626d9 user: dgp | |
| 04:30 | • Ticket [1664597fff]: 2 changes artifact: a3b712fd7f user: dgp | |
|
2007-02-20
| ||
| 19:16 | • New ticket [1664597fff]. artifact: 643e273e24 user: nobody | |
upvar bug
Closed / Invalid1664597fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2007-02-20 19:16:44
A small script:
## script start
namespace eval ns1 {}
namespace eval ns2 {}
namespace eval ns3 {}
upvar 0 ns2::a ns1::a
pack [button .bu1 -textvariable ::ns1::a(a)]
pack [label .lab1 -textvariable ::ns1::a(a)]
set ns2::a(a) ns2
upvar 0 ns3::a ns1::a
set ::ns3::a(a) ns3
## script end
The text in the button is : ns2
The text in the lable is : ns2
If I move the mousepointer over the button ".bu1" the text changed to
"ns3". The text in the label ".lab1" is staying "ns2".
I think, both widgets should show "ns3"
Regard
Manfred
dgp Ticket [1664597fff]: 2 changes
[History diff]2007-02-21 04:30:04
dgpplain2007-02-21 04:45:40
Logged In: YES user_id=80530 Originator: NO It appears the issues here are the details of how Tk widgets track their -textvariables. Raise this in the Tk Bug Tracker. If there's an issue specific to [upvar] that I'm not seeing, try constructing another demo script that doesn't use Tk. From what I can see in the submitted example script, [upvar] appears to be working fine. Note also that the use of array variables here is an unneeded complication. Scalar variables show the same behavior.
jenglishplain2007-02-21 07:31:01
Logged In: YES user_id=68433 Originator: NO I get a segfault at exit when running this under wish8.4; there's clearly a bug _somewhere_. Why do you think both widgets should show "ns3"? That isn't immediately obvious.
sf-robotplain2007-03-07 10:20:09
Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
Log in (anonymous is fine) to add a comment.