Browsing All Posts published on »March, 2011«

tcltest Part 2 – Multi-Module Test Suite

March 29, 2011

1

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 […]

Getting Started with tcltest

March 28, 2011

5

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 […]

How to Fix tclsh Line Editing Problem

March 15, 2011

3

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 […]

Tcl – How to Locate Include File to Source

March 12, 2011

3

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, […]

Squeeze Multiple Blank Lines within vim

March 10, 2011

2

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 […]

Building TclCurl on Mac OS X Snow Leopard

March 8, 2011

0

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 […]

Upgrade My Mac’s Hard Drive

March 5, 2011

1

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 […]

Tcl Full-Feature Stack with struct::stack

March 3, 2011

0

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 […]

Tcl: Use Tclx for Lightweight Stack

March 3, 2011

0

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 […]

Follow

Get every new post delivered to your Inbox.

Join 36 other followers