Fixed typos in web services article
14-November-2006 19:12
I noticed a few typos in the web services example which
have now been fixed. One person has reported getting an
error that says "missing value to go with key" when
they try to parse the results of the call using dict,
as I did in the example. So far I haven't been able to
duplicate it.
If you get the same error, try parsing the results using list commands rather than dict. Perhaps the data being parsed with dict in the example isn't a valid dict value. Since every web service will return data in a different format, it doesn't affect the main point of the article which was to show how easy it is to make calls to web services. I may be hard to parse the data, but it's easy to get the data. :-\
If you get the same error, try parsing the results using list commands rather than dict. Perhaps the data being parsed with dict in the example isn't a valid dict value. Since every web service will return data in a different format, it doesn't affect the main point of the article which was to show how easy it is to make calls to web services. I may be hard to parse the data, but it's easy to get the data. :-\
Web Services and the Google API
12-November-2006 23:04
Have you wanted to try your hand at making calls to web
services using Tcl? Tcl has all the building blocks if
you want to roll your own solution, but it can require
a fair amount of knowledge about SOAP. Recently a new
web services library was announced that makes it very
simple to access web services via Tcl. This article
show how simple it is to make a request to a web
service provided by Google.
Read Web Services and the Google API
Read Web Services and the Google API
The best thing to come out of the 2006 conference
15-October-2006 22:15
The best thing to come out of the conference was seeing
the tentative schedule for an 8.5 release. Or was it
learning about full text search in sqlite? Or watching
demos of Ratcl, Whim, L, OO, TkHtml, ...
Read The best thing to come out of the conference
Read The best thing to come out of the conference
Your Second Tcl Program
19-September-2006 21:04
Ok, you've written your first Tcl program. Maybe it did
nothing but print "hello, world", or maybe you copied
some of the examples from a book or from the Tcler's
Wiki. Now it's time to write something real. But where
to begin?
This article describes a couple of simple techniques for organizing your code as you move beyond "Hello, World" and on to more complex applications.
Read Your Second Tcl Program
This article describes a couple of simple techniques for organizing your code as you move beyond "Hello, World" and on to more complex applications.
Read Your Second Tcl Program
Introduction to Toplevels
27-June-2006 21:59
Some toolkits call 'em panels, some call 'em forms, or
windows, or dialogs. Tk calls them toplevels. This
article briefly describes how to create, configure and
use toplevel widgets.
Read Introduction to Toplevel Windows
Read Introduction to Toplevel Windows
Introduction to named fonts
04-June-2006 21:05
The ability to create fonts with a given name, and to
reconfigure them on the fly is one of the real gems
hidden in the Tk library. This article briefly
describes what named fonts are and how to use them.
Read Introduction to named fonts
Read Introduction to named fonts
On skipping a month...
04-June-2006 21:02
I apologize for those who might have expected to see
some new articles over the past month. I've had some
personal issues to deal with and it was easiest to put
this web site on the back burner temporarily. Hopefully
I'll be able to get back on track. Thanks for your
patience.
Binding and -command scripts
30-April-2006 16:21
One rule of thumb I've often preached on comp.lang.tcl
is to never have a binding or "‑command" script
call more than one command. I've written an article
which describes the reasoning behind this rule of thumb
and a couple of common exceptions to the rule.
Read Binding and -command scripts
Read Binding and -command scripts
Getting started with tcltest
24-April-2006 00:10
If you've ever needed to write a test script you'll
appreciate the power and elegance of Tcl's own test
harness, tcltest. In this article I give a brief
overview of how to use tcltest. If you don't have
tcltest installed I've written a companion article that
helps you get a working copy on your machine. Chances
are, though, you've already got it.
Read Getting started with tcltest and Installing tcltest
Read Getting started with tcltest and Installing tcltest
Toolbars and grayscale images
31-March-2006 18:22
I was reading the Microsoft UI guidelines the other day
to get some specifics about toolbar look & feel for
a project I'm working on. Even though Microsoft isn't
particularly consistent even within their own apps,
they at least publish guidelines as a starting point.
What I learned was that toolbar buttons, in addition to
being flat when the mouse is not over them, should also
be "neutral or grayscale". Of course, what Microsoft
says and what Microsoft does can be two very different
things, but it got me thinking about how this might
look in the app I'm working on.
I wrote a short article showing how easy it is to achieve this effect using a very simple technique that takes advantage of the features built in to the Tk photo image format.
Toolbars and grayscale images
I wrote a short article showing how easy it is to achieve this effect using a very simple technique that takes advantage of the features built in to the Tk photo image format.
Toolbars and grayscale images
Monthly archives
26-March-2006 00:21
Back in December of 2005 there was some discussion
about a Tcl magazine in comp.lang.tcl. There was a fair
amount of interest but nothing ever got off the ground.
It was partly that discussion that motivated me to
finally get off my duff and create this site.
To me, "magazine" means "monthly", so I've decided to organize my articles by month so those who want a monthly magazine-type reading experience can start with the index for a particular month rather than reading this blog. I still hope to post weekly as often as I can so this only affects how I organize the archives. This scheme also lets me use what I hope will be permanent links to each article, in case anyone wants to bookmark or link directly to a specific article.
I'm considering posting the most recent monthly index to comp.lang.tcl shortly after each month ends, so much like we now get a weekly "Tcl-URL!" we'll also get a monthly "last month on tclscripting.com..." to try and get more people interested in the site.
If you think this is a good idea, or if you think it's not, I'd be glad to hear your opinion. Just click on the Feedback link and type in your comments, or send a message to feedback@tclscripting.com.
Thanks for reading!
To me, "magazine" means "monthly", so I've decided to organize my articles by month so those who want a monthly magazine-type reading experience can start with the index for a particular month rather than reading this blog. I still hope to post weekly as often as I can so this only affects how I organize the archives. This scheme also lets me use what I hope will be permanent links to each article, in case anyone wants to bookmark or link directly to a specific article.
I'm considering posting the most recent monthly index to comp.lang.tcl shortly after each month ends, so much like we now get a weekly "Tcl-URL!" we'll also get a monthly "last month on tclscripting.com..." to try and get more people interested in the site.
If you think this is a good idea, or if you think it's not, I'd be glad to hear your opinion. Just click on the Feedback link and type in your comments, or send a message to feedback@tclscripting.com.
Thanks for reading!
Introduction to bindtags
26-March-2006 00:14
Tk has a remarkably powerful mechanism for associating
events with widgets, known as bindtags. I've
written a short article that introduces the concept of
bindtags and gives a few small examples of how they are
used and what they may be used for.
Introduction to bindtags
Introduction to bindtags
Using named arguments
12-March-2006 14:59
Ever want to implement named arguments like most tk
commands? This article gives one solution that is not
dependent on any external libraries.
Using named arguments
Using named arguments
Writing Tk Code in the Right Order
26-February-2006 09:02
The order in which Tk code is written can have a
profound impact on the final result. Widgets may not
resize properly or they might not show up at all. I've
written an article that discusses these two specific
problems and how to avoid them.
Writing Tk Code in the Right Order
Writing Tk Code in the Right Order
Intelligent text widget autoscroll
18-February-2006 23:29
At work we use a simple chat program to keep in touch
since we don't all work in a central office. It's a
handy little app that is just a few hundred lines long.
The program has one little quirk that I find annoying,
which is that when a new message comes in the text
automatically scrolls to the bottom so one can see the
new text. This is what I want 99% of the time but it's
that last 1% that was driving me crazy, and it's that
last 1% that can sometimes make the difference between
an OK application and one that is first class. more...
An example is worth 1000 words
12-February-2006 18:47
One of the tricks I use when I first start writing a
chunk of code is to package the code up in a namespace,
and I (almost) always include a working example as part
of the implementation. I have found that this can be
both a timesaver during development and also a year or
two later when I've forgotten how the code works and
want to use it again in a new project. more...
The difference between eq and ==
29-January-2006 15:27
Starting with Tcl 8.4, expr (and its cousins if, while
and for) includes the operators "eq" and "ne". The
documentation, though accurate, doesn't present much of
a distinction between those and their counterparts "=="
and "!=".
more...
Online Tcl/Tk Book
19-January-2006 06:30
Programming:Tcl
is an open content
WikiBook
on programming in Tcl/Tk. I remember seeing this once
before and had forgotten all about it until its Tcler's
Wiki page was updated today. It's worth checking out.
I've also added a link to it on my Resources page in case you come here later looking for it.
I've also added a link to it on my Resources page in case you come here later looking for it.
You only need curly braces...
15-January-2006 16:51
Unlike some languages which require curly braces to
delimit blocks of code, in Tcl curly braces are always
optional. While this is a fundamental feature of how
the Tcl parser works, few if any books and tutorials
actually spell it out. My way to describe this is with
the following rule:
You only need curly braces when you need curly bracesmore...
Dynamic Forms and Variables
09-January-2006 11:33
Last week on comp.lang.tcl I was helping someone who
claimed to have problems with passing value from an
entry widget to a procedure. Initially it seemed to be
a problem with scoping, but it turns out his real
problem was in needing to create a form with a variable
number of input fields. He was struggling with what to
use as the target of the -textvariable option and how
to reference that in a proc.
more...
Actions
03-January-2006 16:28
One of the more tedious aspects of GUI development is
keeping the UI in sync with the state of the
application enabling and disabling widgets depending on
the current context. For example, if the focus is on a
read-only widget you should disable the paste button,
once data has been entered you need to enable the
File->Save menu item, etc.
Over the years I've learned that this can be a maintenance nightmare. For example, your application may start out with just a File->Save menu. Later you add a toolbar and right-click menu. Then you add keyboard accelerators. Each time you do this you have to find the places in your code where you disable the File->Save menu item and add code to disable all the other widgets and menu items. more...
Over the years I've learned that this can be a maintenance nightmare. For example, your application may start out with just a File->Save menu. Later you add a toolbar and right-click menu. Then you add keyboard accelerators. Each time you do this you have to find the places in your code where you disable the File->Save menu item and add code to disable all the other widgets and menu items. more...
Tcl/Tk Scripting Launches
01-January-2006 17:08
Welcome to tclscripting.com!
For now, consider this site alpha quality at best. I haven't managed a real website in years; my CSS and HTML skills are pretty rusty and I've never done a blog or dealt with RSS before.
I'm also learning a new tool (RapidWeaver, by Realmac Software) that has its own share of quirks. Expect a few bumps in the road while I work the kinks out, and don't assume that links to any particular page will work in the future. Eventually that will change, but for now expect the whole site to be subject to change.
For now, consider this site alpha quality at best. I haven't managed a real website in years; my CSS and HTML skills are pretty rusty and I've never done a blog or dealt with RSS before.
I'm also learning a new tool (RapidWeaver, by Realmac Software) that has its own share of quirks. Expect a few bumps in the road while I work the kinks out, and don't assume that links to any particular page will work in the future. Eventually that will change, but for now expect the whole site to be subject to change.