[incr Tcl] is an object system for Tcl
Questions tagged [itcl]
56 questions
0
votes
1 answer
sourcing a tcl file in itcl code at the global level
I have a tcl file which has few config procs defined. My one app is coded in itcl which needs to call these config proc for each object. I am not able to source TCL file at the global level in itcl. it allows sourcing only within public methods but…

Ruchi
- 693
- 3
- 14
- 27
0
votes
0 answers
variable isn't array error for static array itcl
I have a static variable in my itcl class
public common x {};
Whenever I am trying to access the variable using info exists x ($key), I get an error variable isn't array.
Am I missing something here?

wthomas
- 35
- 6
0
votes
1 answer
Itcl/Tcom/Tcl/Threads: Is this thread continuously running
In of the places I have written itcl code in a thread that kills excel
method Kill_XL {} {
thread::create {
set rc [catch {exec taskkill /t /f /im Excel*} output]
}
sleep 5
}
After that, for several different wish shells the…

Ulysses
- 5,616
- 7
- 48
- 84
0
votes
1 answer
how to create tcl list of multiple list in tcl?
I have list of objects in a variable stored as $m_objs using each object i can get 4 different values like demoRoot demoSuite demoCase and ic so each of those has to be a list of list like this:
set data {
{demoRoot1 demoSuite1 demoCase1 ic1}
…

vinay
- 53
- 1
- 8
0
votes
1 answer
How to callbacks events like bind in incr tcl?
For example I tried this:
package require Itcl
package require Tk
::itcl::class X {
constructor { } {
canvas .c -height 200 -width 200
bind .c {::itcl::code $this A}
}
method A { } {
puts "inside A"
}
}
X aa
but…

Avi
- 310
- 2
- 4
- 16
0
votes
0 answers
Whats the way to find that given string is proper date time format in itcl?
I have this code which takes the values as 1hours/2hours or 3am /4pm, or 1week, 2week, 24hours etc, in time and date formats, and I have this if condition which validates for semantics :
if {[catch {clock scan [getValue]} errMsg]} \
{
…

vinay
- 53
- 1
- 8
0
votes
1 answer
what is the alternative for package require in itcl?
i have many package requires which is used inside the tcl code as below:
package require tlautils 1.0
package require profilemanager
package require tla::log 1.2
package require res_mgr 1.1
package require resource 1.2
package require…

vinay
- 53
- 1
- 8
0
votes
0 answers
in itcl we use a command called chain to use method from base class, is there any alternative way to use?
The use of chain command in itcl make the response for command very
slow when i want to chain the whole class which was inherited, so is
there any other way i can use the base class functions thank using
the chain command in…

vinay
- 53
- 1
- 8
0
votes
1 answer
tcl need a way to get Job Id from the huge string no regexp to use as case can fail
need to fetch job id from this huge string(1618252) and no regexp to do this operation as it may fail when job id is not found----------
% set invoc [[$this cget -testrun] cget -invocation]
tcl profilemgr -configNetwork {} -startBefore now…

vinay
- 53
- 1
- 8
0
votes
1 answer
::itcl::delete throws error "invalid command name"
I am using itcl delete command to delete objects and classes. However, tcl interpreter says "invalid command name "delete". Here is the partial code snippet.
% itcl::find classes
datapath point datapath_point
itcl::find objects
datapath_point0…

boppu
- 135
- 2
- 3
- 9
0
votes
2 answers
Tcl/Tk - Unable to attach class method as button command
I was trying to attach a method to a command button but got the following error message. Its working fine if i attach a proc.
How to do this?
% itcl::class a {
method test {} {puts test}
constructor {} {
button .t.b -command test;
…

Ulysses
- 5,616
- 7
- 48
- 84
0
votes
1 answer
itcl tabnotebook missing tabs on Windows
I have a itcl/tk application that runs fine on Linux (and for the most part on Windows too). Have a frame where I packed an iwidgets::scrolledframe and within that an iwidgets::tabnotebook where two tabs were added.
Never have a problem on Linux,…

bk888
- 11
- 4
0
votes
1 answer
difference between uninitialized and initialized class variable in itcl
I have used the following two versions of a class variable:
::itcl::class Subcase {
variable _id
}
and
::itcl::class Subcase {
variable _id -1
}
Obviously, the only apparent difference, is that the former does not have an initial…

Ingo
- 75
- 1
- 9
0
votes
2 answers
How to rename itcl::ensemble
Is there any way to rename itcl::ensemble?
If not can be replace itcl::ensemble with some other ensemble without any side effect?
Thanks

SaurabhS
- 633
- 1
- 7
- 18
0
votes
1 answer
Itcl Appropriate return value of configbody
I want to return from a configbody but cannot do so explicitly without causing the variable not to be set.
I'd like help understanding the behavior I'm seeing. Please consider the following code (using Itcl 3.4):
package require Itcl
catch…

Robert Lugg
- 1,090
- 2
- 12
- 40