[Incrtcl-develop] [ incrtcl-Bugs-2738515 ] itcl 4.0b3 and broken tcl "info exists" command
by SourceForge.net other posts by this author
Apr 6 2009 1:14PM messages near this date
[Incrtcl-develop] [ incrtcl-Feature Requests-2778649 ] new config option for listbox type widgets
|
[Incrtcl-develop] [ incrtcl-Bugs-2738459 ] itcl 4.0b3 and broken tcl "info exists" command
Bugs item #2738515, was opened at 2009-04-06 16:13
Message generated for change (Tracker Item Submitted) made by aclavel
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=113244&aid=2738515&group_id=13244
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Other
Group: 4.0*
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Code Monkey #25297650 (aclavel)
Assigned to: Arnulf Wiedemann (wiede)
Summary: itcl 4.0b3 and broken tcl "info exists" command
Initial Comment:
platform Win XP SP2 32-bit
Tcl 8.6
Tk 8.6
itcl 4.0b3
Hi,
Variables passed "by reference" can't be found using "info exists" from inside a method.
I'm wondering if you can reproduce this too, or maybe there's something wrong with my itcl d
ll.
Here's a short script that illustrates the problem (this works fine with itcl 3.4 - all the
info exists statements return true):
package require itcl 4.0b3
itcl::class ClassA {
private variable Value
constructor args {
set Value 5
}
public method putValue {} {
puts "My Value=$Value"
if {[info exists Value]} {
puts "So this works."
}
}
public method putLocalVar {} {
set foo "bar"
puts "foo=$foo"
if {![info exists foo]} {
puts "This is broken!"
}
}
public method putMatrix {arrayName} {
upvar $arrayName myArray
parray myArray
if {![info exists myArray]} {
puts "And this is broken!"
}
}
public method putVar {varName} {
upvar $varName myVar
puts $myVar
if {![info exists myVar]} {
puts "This is broken too!"
}
}
}
set aObject [ClassA #auto]
$aObject putValue
$aObject putLocalVar
set stuff(a,b,c) 0
set stuff(d,e,f) 1
set stuff(g,h,i,j) 2
$aObject putMatrix stuff
set baz 42
$aObject putVar baz
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=113244&aid=2738515&group_id=13244
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Incrtcl-develop mailing list
Incrtcl-develop@[...].net
https://lists.sourceforge.net/lists/listinfo/incrtcl-develop
|