Version 111 of Tiny Tcl/Tk IDE

Updated 2009-06-20 17:47:14 by Lectus

wdb As an Emacs fan, here are the features I like mostly:

  • double-click on opening paren selects complete expr
  • speedbar shows procs and methods
  • command line allows quick tests

I submitted a question concerning how to customize Emacs to accept not only procs but also self-defined xprocs etc, but I got no answer. The solution of learning Elisp would take me more time than to make a new environment in Tcl/Tk. So, here it is: yet another IDE [L1 ], written in pure Tcl/Tk, optimised only for Tcl/Tk, quick'n'easy.

http://wolf-dieter-busch.de/html/res/Heimatseite/img/sw/ScreenshotTclIDEsyntaxHighlight.png

Written in pure Tcl/Tk such that you are not stuck to some special OO extension etc. Documentation (Beta) included: [L2 ].

2007-06-08 -- Update: Hilight of [proc call] more precise. Hilight of first word in line as command always bold, but if it is a $string, then fg color inherited by strings (maroon fg), and if it is a [proc call], then fg color is inherited by proc calls (red fg). In general, it is more consistent than any regexp-driven solution I can imagine. (But of course, everyday there can come a wizard who solves that, too ...) Problem: casually watched that app hangs. Cannot say if it depends on Hilight or not. Must watch. Problem reports appreciated.

The Hilight deals only with the Endekalogue, i.e. the procedure if is recognized by its first position on command line, but the keyword else is not recognized as it is just another pure-string argument to an arbitrary procedure. Completely spoken: Tcl has no keywords. -- This syntax hilight recognizes {expand} constructions {*}... -- More on the GUI of syntax hilight: if you open a file which is very large, then you can edit it immediately, but it can take several seconds before you see the syntax hilighting as it is bound to after idle event. This idea is stolen from MS Frontpage (which I do not like very much, but honour to those who honour deserve).

By the way. How do we think about software patents? Never ever! Thank you for your patience.


Anticro (member of German Tcl/Tk forum) reported problems displaying paned windows on Apple computers. He allowed me to use his GUI for an alternative version of Tiny Tcl/Tk IDE. See screenshot. It is an alternative. The download contains two GUIs (IDE.tcl and niceIDE.tcl) but only one core (inside lib/ located). Anticro deserves a hip-hip-hooray.

http://wolf-dieter-busch.de/html/res/Heimatseite/img/sw/Bildschirmfoto-niceTiny_Tcl-Tk_IDE.png


Features

  • syntax hilight -- see screenshot above
  • search/replace of regular expressions also in replace field, see screenshot below
  • double-click, see above
  • Tab key on start of line invokes smart indent
  • bookmarks
  • directory window provides preview of procs in closed docs
  • keywords (method, proc ...) are hideable as well as namespace paths in directory window
  • command-line provides quick test,
  • send regions from text window directly to console window.

http://wolf-dieter-busch.de/html/res/Heimatseite/img/sw/Bildschirmfoto-search.png

Moreover

These features are packaged such that they can be used separately (feel free to test them):

  • syntaxhilight -- the main command is syntaxhighlight::highlight win
  • double-click -- changes Text bindings, see above
  • emacsIndent -- provides smart indent on Tab key
  • scrolledtext -- text widget with scrollbars
  • speedbar -- provides double-window with directory and file contents
  • consoleframe -- provides tiny console, not as top-level but as frame

Being optimised to easy overview on a project, this tool should be usable for a beginner.


2007 May 22 rgf To run this under linux with tclkit 8.4 I needed to comment out line 15 "namespace import speedbar::speedbar" ... apparently this is already done by the package?

wdb Yes it is. Some style guides say about delivering packages: do not pollute root namespace by importing your commands. But, formally seen, speedbar is constructor of a mega-widget, and I put it to the root namespace as well as constructors of core widgets.

The double call of namespace import speedbar::speedbar is now removed.

escargo 29 May 2007 -- It was probably unintentional, but the latest packaging of the IDE.zip file included the emacs backup files for IDE.tcl and syntaxhighlight.tcl. While instructive in a way, they add another 23K (uncompressed to the zip file). (And the backup file shows that the new IDE.tcl file has added even more blank lines to the bottom of the file.)

wdb -- Thanks for the hint, I'll care better in future. Currently, I work with Ubuntu/Nautilus where system files are hidden if I do not unhide them intentionally (which is rarely the case).

escargo 1 Jun 2007 -- I noticed that the IDE apparently is trying to show the cursor position. However, I observed that while the number changes as I point and click, it does not seem to change when I use the keyboard arrow keys to move the cursor around. wdb This bug is on my to-do list. Dealing with priority of events is sometimes dangerous, a little bit :-( escargo - It's not a big deal; I'm not even sure I would count it as a bug. emacs has a key sequence that can be used to ask where the cursor is. Maybe a keyboard shortcut to update the cursor position would be enough. wdb The problem is: Update of row/col is bound to <<Change>>. It consists of <Key> and <Button>. But if Syntax Hilight is on, then event <Key> triggers something such that it hides the <<Change>> event. I'll solve it. wdb A few hours later (at home): done. But, I agree, it was not prio 1. The main reason for my efforts were: I had some new idea, and after the solution, the script is simpler.


wdb 19 Jun 2009 -- contained package doubleclick modifies tk-internal procedures of text selection. These procedures change when switching from Tcl 8.4 to 8.5 so I modified the changed procedures anew. If you use this IDE with Tcl 8.4, then package doubleclick is caught, but you can continue working.

Note that eTcl text selection procedure differs from "regular" Tcl distribution. If you want to use this IDE with eTcl, comment out the line "catch {package require doubleclick}".


Lectus: Nice work! I really like this IDE!


Category Dev. Tools - Category Development - IDE