English 中文(简体)
Create a Fully Featured Environment For Tcl/Tk Development Under Windows
原标题:

I m now learning Tcl/Tk, but as I m running Windows, I want to create a fully featured(professional) development environment for this language, but I need to know:

  • Which tools I need to install(first of all)?
  • What are the IDEs that support Tcl/Tk development?
  • What is the best text editor to develop in?
  • Where I can find some librarys for it(if exists)?
  • It s possible to do some web applications with it?
    • It uses CGI?
最佳回答

Start off by installing ActiveTCL. It is free and includes TCL and TK bindings. If you have a favorite text editor you can use that. Make sure you have syntax highlighting. If you want something more advanced, I d recommend Komodo. It is by active state and has a free version. It semantically understands TCL, so it is more intelligent than a standard text editor. For example it highlights syntax errors while you code.

Now write some code and spread the TCL love!

问题回答

For an interactive Tcl shell, use TkCon

For an editor, I use Komodo or Vim

For web apps, there are FrameWorks, servers: TclHTTP, Aol Server, Apache modules, and of course CGI

For a text editor I would recommend trying jEdit; it has TCL syntax highlighting. When installed I would also recommend installing the following plugins (which can be done via the built-in plugin manager):

  • Project Viewer: Allows you to organise your files into projects, which gives it more of an IDE feel.
  • Editor Scheme: Gives you a set of pre-defined syntax highlighting colour schemes to choose from. My preference is for "zenburn".

As Byron mentioned, ActiveTCL is the place to start when using TCL on Windows. As for a text editor, I personally like SciTE, but any text editor that will do syntax highlighting will do (code folding helps as well).

The TCL wiki has the following page regarding IDEs: http://wiki.tcl.tk/998

If you are in need of a library providing specific functionality, I would first check the TCl wiki. There is no central repository of TCL extensions, but the wiki seems to be the central repository of TCL knowledge.

Yes, you can use TCL for web-based projects. You can find a bit of info here regarding CGI and TCL. Some webservers (AOLServer for instance) have a built-in TCL interpreter.

Others have already mentioned TkCon but most people don t utilise the full power of TkCon. It is much more than a REPL loop (for that you could have just used tclsh or wish). My favourite feature is TkCon s edit command.

Basically:

edit some_file.txt

lets you view and edit files.

set my_variable "some value"
edit my_variable

lets you view and edit the content of a variable, even arrays

proc my_function {} {}
edit my_function

lets you view and edit the body of a proc. In fact, this is how I usually write non-trivial procs in TkCon.

If you re going to write code that needs Windows-specific functionality, you will definitely want to get TWAPI the Tcl Windows API library.

With regards to the mentions of ActiveTcl - ActiveState (the creators of ActiveTcl) have been developing an extension repository. Certainly there are extensions which do not (yet) appear there, but there are over 3000 entities in their repository at this time, so many extensions are present there. ActiveTcl comes with a program called "teacup" which provides a command line interface to the repository, allowing you to install specific extensions (or, if you are like me, allowing you to install all the extensions relevant to your platform).

The Tcler s wiki has a number of references to additional tools and extensions. However, your favorite web search engines are likely to turn up utilities, tools, extensions, and applications not yet documented on the wiki or added to the ActiveState repository.

MyTcl is a fairly nice IDE with a Tcl environment included, autocomplete, syntax highlighting, debugging, etc. It has a similar look and feel to Visual Studio. The homepage is in Korean, but it s not too hard to find the download.





相关问题
How to create data structure in Tcl?

I am translating some lisp code to Tcl and wonder if there is anything like lisp s defstruct in Tcl for creating data structures? If nothing is built into Tcl, what extension packages to Tcl would ...

(Tcl/Expect) clear screen after exit

I want to clear the screen (on the local machine) after exiting from my (semi) interactive expect script. Can I do that from within the script? Here s what I tried, that failed. #!/usr/bin/expect -f ...

Implementation question in web-development

We are testing a DSL modem s web pages (the HTTP server is running on the modem). We have an automation tool that configures various options on the web pages by sending POSTS of the respective web ...

Linking Tcl/Tk to Python 2.5

I have an existing Python 2.4 and it is working properly with tkinter as I tested it using python import _tkinter import Tkinter Tkinter._test() Now, I have installed ...

热门标签