The Problem Now that I created my first tcltest module, I want to break up my tests into several modules. I also want to separate my tests from my source code. The Solution In this tutorial, I will pick up from the last time. Recall that in the previous post, I created the first test […]
March 28, 2011
The Problem I want to use tcltest to unit test my code, but don’t know how to start. The Solution This tutorial will guide you through a step-by-step process on how to get started with tcltest Installation Installation is in in the scope of this tutorial, I assume that you have Tcl 8.4 or 8.5 […]
March 15, 2011
The problem One sentence: command line editing sucks in Linux and Mac. On Windows, you can use the up and down arrows, among other things, to recall last lines and edit. On Linux and Mac OS X, these keys don’t work, making line editing difficult. The Solutions In my previous article, I mentioned using tkcon […]
March 12, 2011
The Problem In your Tcl script, you want to source (include) another script that resides the in the same directory. However, all is fine if your scripts are in the current directory. If you execute the main script from a different directory, Tcl complains that the included script is not found. To demonstrate this problem, […]
March 10, 2011
The Problem I want to squeeze multiple blank lines into just one while editing in vim. I often receive source code which the author used multiple blank lines to separate functions. I don’t mind if functions or code block are one or two lines apart, but I have seen sources where functions are four or […]
March 8, 2011
The Problem I want to install TclCurl on my MacBook Pro running Snow Leopard, but the only installation option that I can find was to build it via MacPorts. However, I don’t want MacPorts since it will be pulling in too many components. All I want is to build TclCurl and install it. I did […]
March 5, 2011
My 4.5 year-old MacBook is getting slower every day due to its age against the new OS and applications. To give it a new lease in life, I replaced its 500GB hard drive with a 120GB SSD from OWC. This post discusses the upgrade process. Before the Upgrade Unwind Applications This step disconnects the applications […]
March 3, 2011
The problem You need a stack solution which provides more than just push and pop for your Tcl script. The Solutions In the last post, I discussed the use of Tclx package’s lvarpop and lvarpush to turn an ordinary list into a stack. In this installment, I will discuss the struct::stack package which provides more […]
March 3, 2011
The problem You need a lightweight stack for use in your Tcl script. All you need are push and pop, and nothing fancy. The Solutions There are several solutions to this problem. The first is to use the struct::stack package, which will provide you with a complete stack implementation. The second is to use the […]
March 29, 2011
1