ActiveTcl discussion

Tcl and ActiveTcl usage questions; Tcl practices and programming questions

Scroll multiple listbox

After struggling for years to scroll multiple listboxes with a single vertical scroll bar I came upon a really easy solution. Instead of using the vertical scrollbar I used the vertical slider.

I am currently using Visual Tcl, tcl/tk 8.4, on my Debian Jessie (32 bit) machine (I don't like the most recent version of Visual Tcl). The solution is to set a binding for the slider, and in the code get the slider position and use that to set the yview for the listboxes. Here is the Visual Tcl code (binding) for that to work.

 
      set listIndex [$widget(Scale1) get]

Opening a serialport and transmitting on the dtr, rts and txd pins

Hello all,

I am new to tcl and I am trying to find some code that will open a serialport and be able to transmit on the dtr, rts and txd pins of my rs232 to usb cable.

Has anyone done this before and have some code examples or can someone point me to a good source for it please.

Thanks in advance
Ant

Error in startup script

Hello guys,

I am trying to run a tcl code but having an error message as "Error in startup script", invalid command name "wipe" while executing "wipe". Did some of you encounter a similar problem and solve it?

Thanks in advance

[Tcl/Tk 8.6]Tk window(toplevel) became unresponsive while launching tk_messageBox on Linux platform

Tcl/Tk Version Information:
Platform: Linux
Tcl Version: 8.6.7
Tk Version : 8.6.7

Issue: [Tcl/Tk 8.6]Tk window(toplevel) became unresponsive while launching tk_messageBox in Linux platform

Step to Reproduce issue:
1. create a sample tk window using toplevel command with a button.
toplevel .window
button .window.button1 -text "Ok" -command "puts hello"
pack .window.button1
(At this point everything works fine, .window and .window.button1 works fine)

2. open tk_messageBox. Now after launching tk_messageBox, .window and .window.button1 is became

Formating long strings with new line

Hello Forum,
Newbie here with a request for help with formatting. I need to trim and add newline at each "\" in a file location string that lies beyond the 60 character max for each line. Sample in attached file will be best explanation. Please notice the final file name is on its own line, 60 characters is max length per line and the indent is 3 blank spaces after the '('

Thank you for any assistance

i have a isuue

hi everyone
The difference is in which math library they call.

Java, Google, and C# are using the MicroSoft C# floating point math library.

Tcl and Perl are using a C floating point math library.

Both libraries follow their respective standards, so both are correct. You may disagree with the way the standards have been defined, but that is one of the differences of C vs C#.
thanks

Get The Command To Be Deleted

Hello,
I am writing a C++ extension for ActiveTCL. As I understand it the Tcl_CmdDeleteProc that is supplied when a command is created will be called when the command is to be deleted.

When called, the Tcl_CmdDeleteProc is supplied with the Client data for the command. But I would also like to know the name of the command that is about to be deleted but that is not provided to the Tcl_CmdDeleteProc. Is it posssible to get the name of the command that is about to be deleted?

Thanks.

TCL Shell works but Komodo Shell does not

The following script called test1.tcl works well from a tclsh command line.

# test1.tcl
set matchResults [exec /usr/bin/neo4j-client --non-interactive --eval "match (n) return n;" localhost]
puts "Success! \n\n $matchResults \n"

% source test1.tcl
Success!

"n"
"(:LibCell{library:""Nangate45"",name:""AND2_X1""})"
"(:CellPins{name:""CellPins""})"
"(:CellModes{mutuallyExclusive:true,name:""CellModes""})"
"(:CellEvents{mutuallyExclusive:true,name:""CellEvents""})"
"(:CellPin{capacitance:9.999000,name:""A1"",direction:""input""})"

tcllib missing from Tcl 8.6 Community Edition

Tried to import the crc32 package and the response is "can't find package crc32".

Is tcllib not included in the Community Edition? If not, why document it in the Help file?

What else is not included in the Community Edition?

Error in choosing directory for installing ActiveTcl 8.5 for OpenSees

Hi,

I'm trying to install ActiveTcl 8.5.18.0. for OpenSees software. The instructions are to save it in C:/Program Files/Tcl.

But I attempt to do this, it says, "Cannot Write to Directory "C:/Program Files/Tcl". Please choose another directory.

Any help would be greatly appreciated

Joe