Ticket UUID: | 046fa04231057d36493b54967d89f35a48a07a43 | |||
Title: | Don't invoke unqualified upvar | |||
Type: | Patch | Version: | 1.9.7 | |
Submitter: | anonymous | Created on: | 2014-05-20 15:20:09 | |
Subsystem: | bwidget | Assigned To: | oehhar | |
Priority: | 7 High | Severity: | Important | |
Status: | Closed | Last Modified: | 2014-05-21 07:05:24 | |
Resolution: | Accepted | Closed By: | oehhar | |
Closed on: | 2014-05-21 07:05:24 | |||
Description: |
Widget::getVariable should not invoke unqualified upvar on the caller's scope, as users defining a procedure named [upvar] in some namespace don't expect it to be used by BWidget. --- bwidget-1.9.7/widget.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bwidget-1.9.7/widget.tcl b/bwidget-1.9.7/widget.tcl index 2aee154..b305ffa 100755 --- a/bwidget-1.9.7/widget.tcl +++ b/bwidget-1.9.7/widget.tcl @@ -1559,7 +1559,7 @@ proc Widget::getVariable { path varName {newVarName ""} } { variable _class set class $_class($path) if {![string length $newVarName]} { set newVarName $varName } - uplevel 1 [list upvar \#0 ${class}::$path:$varName $newVarName] + uplevel 1 [list ::upvar \#0 ${class}::$path:$varName $newVarName] } # Widget::options -- -- 1.9.3 | |||
User Comments: |
oehhar added on 2014-05-21 07:05:24:
Committed by checkin [3b0b4ecf4f]. Thank you ! |