If you're working on Windows, you might want to look into the XBit extension, which includes a TWAIN API. I've not used it myself, so I can't really provide any more details than what you're find at the XBit home page, http://www.geocities.com/~chengye/soft.html.
- Ken Jones, President...
You certainly found a workable solution. In case you're still a bit hazy on how the bindtags command works, you can take a quick look at my replies in Thread287-211083. Given that additional background, you can probably figure out what's happening in your case...
Most widget functionality is...
Ah. Now I see your dilemma. For all but the most simple of cases, I wouldn't try to replicate BLT's graphing features with the canvas if at all possible. But yes, using Prowrap with BLT is quite problematic. I see at least three possible ways to approach this:
Use TclKit technology instead of...
The canvas is an incredible widget, with more fascinating features than most people are aware of. However, it does have some limitations, and an easy method for "zooming" the view without actually scaling all the objects is one of them. (The ability to rotate objects is another big missing...
ulis basically explained what you're experiencing. For more information on this -- as well as how to work around it -- go to the Tcl'ers Wiki (http://wiki.tcl.tk) and check out the page "Tcl and octal numbers," http://wiki.tcl.tk/498.
There is a TIP (Tcl Improvement Proposal) to remove this...
Nope, it's correct as written. Note how len gets set:
catch {gets $sock line} len
So catch stores the error message generated in len if an error occurs, or the return value of gets if there is no error. (I'll address what gets returns in a moment.) We then test the return value of catch in the...
I don't know exactly what your C program is doing, but I suspect you don't want to keep closing and reopening the pipe. Keep in mind that when you open a pipe in Tcl, the open actually starts the other program running and connects up the pipe channels for you to use. So if you do something like...
Check out the string map command (introduced in Tcl 8.1.1). It does exactly what you want: it takes a list mapping input character patterns to output character patterns and a string to process, and returns the result of the replacement process. For example:
set translation {
red...
Just a note that you'll detect an EOF condition only when the pipe closes. (And even then, Tcl's eof command returns True only if the previous attempt to read from the channel via gets or read detected an EOF condition.) Flushing the channel doesn't close the channel, it just sends any data that...
There is some rudimentary support for this with the listbox widget. Check out the listbox itemconfigure operation, and the various attributes that you can set on a per-item basis. However, this isn't particularly robust, especially if you're updating the contents of the listbox frequently.
In...
The quick and dirty answer:
eval button .exit $list
The eval command concatenates all of its arguments, exactly like the Tcl concat command, and then executes the result. But be aware that there are dangers lurking in eval for the uncautious. Check out my response in thread287-727277...
True, but it's simply an alias to the http://www.tcl.tk site. And I'm pretty sure that the company that acquired Scriptics won't be renewing the domain when it expires. At that time, it'll probably be snapped up by one of the countless domain name squatters who'll either try to sell it, or (more...
Just to clarify Breadcrust's comment, in case people are unaware, Scriptics was acquired by another company 3 years ago, which discontinued support for all Tcl-related products and services. A shame, because I'd happily still be working there otherwise.
But the new, canonical URL for the Tcl...
Well, here is an area where Tcl doesn't make it as easy as it could. The exit code of an exec'ed program is available, but not in a straightforward manner.
When an error occurs in Tcl, it stores values in a couple of pre-defined global variables. One of those is errorInfo, which gets a stack...
Oops. I typed the wrong command name. It isn't bgerror, but bgexec. At least I gave the correct Wiki page link.
- Ken Jones, President, ken@avia-training.com
Avia Training and Consulting, www.avia-training.com
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.