----- '''EDIT/RECENT CHANGES''' * Edit this page: http://wiki.tcl.tk/edit/11149@ * Recent Changes: http://wiki.tcl.tk/4 ----- '''Mail''' [Robert Abitbol] Thanks Peter for your excellent presentation on the "Answered Questions on ..." pages. The idea to put trails on each page (Home, back, and forward) was '''grand'''. The idea for a table of contents for each page was also very appropriate. The same goes for the excellent presentation on the [Answered Questions Index Page]. This is very professional work which makes those pages a pleasure to read. Thanks again! ---- [Robert Abitbol] Hi again Peter, I am not a programmer, I'm more a designer, an architect and I modestly don't have the required knowledge to identify the subject, to put the title to any of the answered questions without a little help from my friends (as the Beatles songs went) :-). But I surely can move them on the right page and create new [Answered Questions on:] pages! Can you please write the title and the category of the 10 questions I have moved to [Answered Questions to be classified]. From the info you'll give me, I'll move them to the appropriate [Answered Questions on:] pages afterwards. If on the other hand you feel like doing all the moving work by yourself, it's also fine by me. Just let me know. Best regards. -- Robert Abitbol Peter Newman 30 October 2004: Thanks Robert. But I don't think I could handle doing it that eay. The problem is that each question and answer takes 2 or 3 minutes to do. And that's the time you need to read it, and try to figure out what's really being discussed, and what category it's to go in. Having decided on a category, I move it there. But then, where it goes on that page, and what title I'll give it, depends on where other related things on that page are, and what they're called. So all the time's in the thinking - which is both before and after the few mouse clicks needed to physically move it. And whilst I might decide that it should go on a certain page, it's not till I actually get it there - and then look at the other questions/answers on the page - that I can really decide that that's definitely where it should go (and what it should be called). Obviously I can't do it all myself. But moving an individual question and answer is really an all or nothing thing, that one person's got to do - and you can't really sub-divide. But you've been doing a great job with the other bits and pieces. And if I think of some other thing that you might be able to help out with, I'll let you know. Thanks, Peter. ---- ---- '''Please don't edit anything below this line. It's stuff from [Ask, and it shall be given.] that's being transferred to the "Answered Questions On: Whatever" pages. Thanks. Peter Newman, 29 October 2004.''' ---- ---- '''Category: ''' Nov 04, 2003 Newbie asks: I'm trying to create a "yellow stick note" app. I have created a little decoration-less window using wm overrideredirect, and now I need to generate window-moving events so that I can manually place the sticky note. I believe I need to use event generate, but how do I get drag coordinates into a little script, which would (I believe) call wm geometry? Thanks... Here's a solution: set ::moveable 0 wm overrideredirect . 1 bind . {set ::moveable 1} bind . {set ::moveable 0} bind . {if {!$::moveable} {break}; wm geometry %W +[expr %X-10]+[expr %Y-10]} JPT Newbie responds: Sacrosanct bovine, Batman! You guys sure make it look easy! Just to make myself feel better, I modified your solution so that the frame wouldn't 'jump' to the cursor: set ::moveable 0 set ::X 0 set ::Y 0 wm overrideredirect . 1 bind . {set ::moveable 1; set ::X [expr %X-$::X]; set ::Y [expr %Y-$::Y]} bind . {set ::moveable 0; set ::X [expr %X-$::X]; set ::Y [expr %Y-$::Y]} bind . {if {!$::moveable} {break}; wm geometry %W +[expr %X-$::X]+[expr %Y-$::Y]} ---- '''Category: ''' 22-Oct-2003 I'm using tclkit to run tcl stuff on windows plattforms, but i can't open files under Windows XP. Win 2000 works fine, are there any known issues with Win XP, maybe concerning filepaths? Bernd [Vince] -- no, there are no known problems on XP. You'll have to be much more precise about what your doing. Provide a short script (< 10 lines) which works on 2000 but fails on XP. This should be easy if you ''can't open files''. Well, a single line will do: "set FILE [open test/file.txt r]". This works fine on 2000 but fails to find the requested file on xp. The problem remains when i replace slash by backslash, i'd think both variants should work. There is nothing else in the script i used for my test, the script is wrapped for win using: "sdx wrap tclxp.exe -runtime tclkit-win32.upx.exe". -- Bernd I'm really surprised now, because i can't even open a file in the same directory ("set FILE [open file.txt r]"). So it's not a slash, backslash problem. -- Bernd [Vince] with any bug report, the ''error message'' you get is critical. Anyway, I suggest you report this on comp.lang.tcl or on sourceforge, not here. ---- Question on text widgets displaying large files moved to [text]. ---- '''Category: ''' 18-Oct-2003 Hello! I have a question about Winico. I have installed the package and have trouble loading it. After copying the winico03.dll into the working directory, I enter the following: load winico03.dll I get a cannot find library winico03.dll or one of its dependants. What would cause this and what do I do to overcome it? Thanking you in anticipation. ---- '''Category: ''' Broken Link??? Sep 30 - 2003 Hello. I tried the following link that was on the wiki site (ftp://ftp.dcade.de/pub/ml/tcl/packages/tcl_messageBox10.zip) but could not get through. Anyone have any luck as I would like to view this. Thanks Ep ---- '''Category: ''' Tcl Installation/Uninstallation Sep 30 - 2003 Hi all! I easily compiled and installed the latest Tcl source code. I was needing it for compiling expect. Now I am done with my tasks, I have successfully uninstalled expect, but I found that there is NO make uninstall available for the Tcl code. Does anybody know any way to uninstall Tcl source code, apart from searching by date and removing file by file!? Your help is much appreciated!! Have fun, Oscar ---- '''Category: ''' Sep 29 - 2003 How can i use the options(-error,-sockname,-peername) of configure command of socket ? The main problem is, like -sockname option returns three elements so how can i store these values to use further? ---- '''Category: ''' Sep 25, 2003 I have a channel that I have opened as: set cid [ socket -server cfg $port ] From time to time the client times out reading this channel. When that happens the data in the buffer (from a puts command) is no longer valid. I would like to throw it away. NOT [flush] it, which just sends it to the client the next time the client tries to do a read, but actually empty the buffer and throw the data away. How can I do this? Thank you in advance. ---- '''Category: ''' 20-Sep-2003 I'm messing around with tk_setPalette I have a problem with the foreground being black on black or more precisely very dark blue this is only a problem with errors which I can't read unless I edit both libs: dialog.tcl and bgerror .tcl. I made the foreground red which is readable. I hate messing with the lib scripts though, is there a way I can do this from within the main script? ----- '''Category: ''' 04/August/2003 (Formerly 31/July/2003, with added details) I am trying to analyze some hex numbers with odd size bit fields and was trying to write a tool to break up the bit fields. The problem is that I haven't been able to figure out how to enter hex numbers and have them not converted to decimal in the ENTRY field. It's hard to figure out if the rest of the code works when the display keeps changing to decimal on me. Thanks in advance! Okay. I had vTCL write a GUI where I enter a number at the top which will be HEX in the final version. Then I have fields that allow entry of up to 16 bit-field sizes and a a display area for each field's value. The last element is a "doit" button. The code then figures out how many fields there are and for each field it uses shifts to eliminate all bits outside the current field with the field ending up in the low order bits so it can be displayed. Now that I have the basic GUI, I'll make all the other changes myself. Here's an example: Initial number is A5A5, divide it into a 5 bit field, a six bit field and a five bit field: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 <-- Bit number | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | <-- Bit Value ----------------------------------------------------------------- | 1 0 1 0 1 | 0 1 0 1 0 1 | 0 1 0 1 0 | <-- Desired fields 0x15 0x15 0xA <-- Values of desired fields in HEX The problem is the initial entry of the hex numbers. Here's my current entry command where I've tried to limit the input to hex digits, but it treats the entry as a decimal integer (I currently have to enter decimal to get it to take a number, so I had to increase the field size and chose 8): entry $base.ent61 \ -background white -takefocus {} -textvariable RawHex -width 8 \ -validate key -vcmd {expr {[string is xdigit %P] && [string length %P] < 8]} [FW]: So does it ''treat'' the entry as a decimal integer, or actually convert it? You've said both. -------- '''Category: ''' Question (12 June 2003) [MAK] I recently had a visually-impaired prospective customer, who uses a screen reader program called Jaws [http://www.freedomscientific.com/] evaluating one of my products that uses Tcl/Tk for the GUI. I decided to try it myself to see how the GUI could be improved for such use. Not surprisingly there were some problems, mainly with some custom megawidgets that aren't really conducive to screen reader use, though many would be fairly simple to fix (such as allowing elements to take focus that currently don't). Some basic widgets/elements such as menus and text widgets seem to work okay, others like entry widgets don't, at least the way they're currently used. Some work partly: the text widget speaks when you select text, but for some reason my syntax highlighting causes only parts of the text (the non-highlighted parts) to be spoken. Perhaps someone has experience writing screen-reader-friendly Tcl/Tk applications and could write a bit of a tutorial or tips page of some sort on developing Tcl/Tk applications that are compatible with screen readers? Thanks. Note: I did see [Speech Synthesis, or Talk to me Tcl] but it seems like it might be better to make use of any features inherent in Tcl/Tk widgets to tie into Windows Accessibility features that a screen reader such as Jaws use. Some items work fine, so why not all? ---- '''Category: ''' Question (9 jun 2003) : I'm trying to compile a c++ dll library (under Windows 2000, using Dev-Cpp) that interfaces with tcl scripts. Even if I've linked the tcl83.lib and tk83.lib, and include tcl.h, I get the linking error: "undefined reference to _imp__Tcl_CreateInterp" and other similar. Same error if I try to compile a simple c/c++ program. The strangest thing is that, if I split the tcl functions in a testing procedure in the same file as the main it works. But as I use a different file for the procedure, the compiler gives the same linking error. Could anyone help me? Please write to: eyes.wide.shut@katamail.com