Questions tagged [itcl]

[incr Tcl] is an object system for Tcl

56 questions
1
vote
1 answer

lsort -unique -command for objects

I have a list of rectangles, and, I need to report an error if there are overlapping ones. So, I've decided to use lsort -command to sort my list and, then, compare new and old lists' lengths. If they're not equal, then, there are overlapping…
Heghine
  • 435
  • 3
  • 15
1
vote
1 answer

Can we write a itcl class object into a external file?

I have a simple class object with a specific set of data in itcl. package require Itcl itcl::class myDataSet { public variable var1 "data1" public variable var2 "data2" public variable var3 "data3" method setVals { v1 v2 v3 } { …
Ashwin
  • 993
  • 1
  • 16
  • 41
1
vote
1 answer

Extend Itcl objects with methods inside the constructor

Is there a possibility in Itcl to extend a class dynamically with methods inside the constructor? I have some functions which are generated dynamically... They look somehow like this: proc attributeFunction fname { set res "proc $fname args { …
TM90
  • 680
  • 7
  • 21
1
vote
1 answer

What method for constracting an object is more efficient?

I have a class that has several inner values: private variable layer_type private variable color private variable name private variable thickness private variable conductivity private variable permittivity private variable loss_tangent I want to…
SIMEL
  • 8,745
  • 28
  • 84
  • 130
0
votes
2 answers

Is there a possibility to get the content of the popdown list of a ttk::combobox before it is opened the first time?

I create a mask which shows only a combobox. I want to color certain elements in red. For several reasons I have to hold a given structure, so that I need three files for it. The first creates the toplevel, in the second the mask is created and…
A.Pitt
  • 47
  • 7
0
votes
1 answer

ITCL: how to display the values in the entry?

In my codes, the entry cannot display the value. How to correct it? thanks package require Itcl namespace eval np {} { itcl::class myTable { variable tableValue constructor {} { array set tableValue {1 a 2 b 3 c 4 d} } proc…
Jimmy
  • 135
  • 2
  • 10
0
votes
1 answer

how to link between C++ objects and itcl objects

I am extending my Itcl program with C++ code and I got the following problem. I want to return an "reference" in my Itcl code to an object in my C++ code using the TCL-C API, The return value should be registerd to an object in my Itcl code so after…
ms_stud
  • 361
  • 4
  • 18
0
votes
1 answer

invoking TCL C API's inside tcl package procedures

I am using TCL-C API for my program. and I read and created test program that is similar to this C++ example. But I have a problem with this example. when I use this example in the shell (by loading it with load example.o) every input automatically…
ms_stud
  • 361
  • 4
  • 18
0
votes
1 answer

creating a package in tcl from a list of tcl/itcl sources

I want to make a tcl package , and I am writing In tcl and also in itcl. Now , My first problem is that I have couple of sources files that are included one in the other , so I am adding the command source that should do the include between them.…
ms_stud
  • 361
  • 4
  • 18
0
votes
1 answer

How to treat a return value from method as a class type - Itcl

Suppose I have the following code implemented in Itcl. package require Itcl itcl::class A { constructor {} { puts $this } destructor {} public method Print {} { puts "ok" } } itcl::class B { constructor {} { } destructor {} …
ms_stud
  • 361
  • 4
  • 18
0
votes
1 answer

Preventing substitution of special characters in an input string

how can I get an input from user with special characters and treat it like a string without using the "/" character? For example: Suppose there is a procedure proc a {input} {...} that gets the following string "classA.arr2[0].classB". If I don't…
ms_stud
  • 361
  • 4
  • 18
0
votes
1 answer

TCL/ITCL - implementing unique data structure using existing data structure

I am new to tcl/Itcl programming. Is there any data structure in tcl or Itcl or any packages provided for those two that can help me implement the next structure (see the picture below). Explanation of the data structure: This data structure is very…
ms_stud
  • 361
  • 4
  • 18
0
votes
2 answers

tcl/itcl - foreach iteration on args input list with two arguments

I have the following code I wrote that should do iteration on my args input list with reading two arguments every iteration. The problem that it isn't working the way I wrote. I looked upon the Tcl/Tk Wikipedia web page but couldn't find any helpful…
ms_stud
  • 361
  • 4
  • 18
0
votes
1 answer

tcl/Itcl error: wrong # args: should be "itcl::class name { definition }"

I am currently learning Itcl language (based on tcl language) and I wrote the following script. the script is implementing a driver that should get 4 parameters and store them inside the private variables of the instance of the…
ms_stud
  • 361
  • 4
  • 18
0
votes
0 answers

configure: error: Cannot find private header tclInt.h in /home/dave/src/tcl-builds/raw/tcl8.4.1

I am trying to build open source tcl code. I am hitting error below: configure: error: Cannot find private header tclInt.h in /home/dave/src/tcl-builds/raw/tcl8.4.1 from the configure script I am not seeing the path mentioned above in error…