XotclIDE

XOTclIDE is an integrated development environment for Tcl and XOTcl

http://www.xdobry.de/xotclIDE/compbrowser.png

Attributes

name
XoTclIDE
website
http://www.xdobry.de/xotclide
current version
0.85
release time
2012-02-11
contact
Artur Trzewik

See Also

XOTclIdeWishes
XOTclIdeBugs

Documentation

XOTclIDE Guide html compressed docbook
XOTclIDE source code documentation generated with internal documentation tool
Pesentation ,Fourth European Tcl/Tk Users Meeting
Making legacy Tcl code object oriented ,Fifth European Tcl/Tk Users Meeting

Description

Description: Integrated interactive development environment for the XOTcl extension (but supports also regular Tcl programs). Provides a Smalltalk like graphical programming environment (ENVY, Squeak, Visual Works) with graphical introspection and editing of a running system. It supports also normal Tcl procs and packages. State can be saved in the form of Tcl packages. Can optionally use a sql-based version control system (MySQL, PostgreSQL, Tclodbc also (MS Access Driver - mdb), SQLite, Oracle per oratcl). (And the Metakit database, which I'm fond of. It deals with Chinese Characters correctly without any extra manual work. SQLite or file-out codes will destroy the characters. Please continue work on it. -- jim, 2005/12/1 (AT- setting encoding system utf-8 helps in such cases))

features:

  1. coding, editing (with syntax highlighting)
  2. code completion
  3. oo-system introspection and browsing
  4. global variables inspector
  5. syntax checker for (tcl and xotcl) Static Syntax Analysis
  6. debugging (partially)
  7. variable access tracking
  8. tracking objects method calls
  9. Coverage Analysis of objects methods calls
  10. configuration (also versioned)
  11. deploying (generation of distribution directories or use-ready tclkit or starkit files directly from IDE)
  12. version control (edition, versions, versions comparing)
  13. testing (Extreme Programming test framework based on SUnit)
  14. open plug in architecture

XOTclIDE is also available [1 ] as wrapped Tclkit and Starkit for Windows and Linux Intel.

You can run XOTcl on Windows from one file without any installation or another requirements.

Plug-Ins

documentation (html doc generator)
Tclkit deployer
Tcl Script Editor
for edit shor Tcl script with code completion and syntax check
Tk Inspector
view and update all Tk windows also with a widget serializer
File Browser
can mount mk4 (starkit) and zip readonly by using vfs
SQL Browser
graphical sql query tool (result in tktable, syntax completion, schema-view)
Visual REGEXP
reimplemented orginal visual regexp and adapted for XOTclIDE Plugin
I18N Helper
scans code after msgcat::mc expression, helps by translation and produce msg catalogs
ATKSqlBrowser
talks to relational databases supported by the XOSql interface (mysqltcl, postgresql, sqlite, tclodbc), Also Sqlite?

There are many small programing tcl tools that can be easy integrated into XOTclIDE as plug ins. Please write here if you have another candidates. I would prefer to integrate existing projects into XOTclIDE. My candidates are:

  1. visual xml
  2. gui builder (vtcl would be good candidate)

Misc

TV: Nice app, I quickly went over it and would mostly be interested to try out tcl programs, I'm not such a fan of the OO stuff where things are wrapped and classed and all (though I did years of Objective C work), I didn't see an easy way, let's say, to set up a tcl program and inspect it, though it seems pretty extensive in what it does.

Artur Trzewik 2003-11-04: There are special script "START.tcl" in XOTclIDE that can be used to start XOTclIDE from any tcl application. After this you can use XOTclIDE to inspect your application. Up from version 0.42 you can use a wizard to import tcl procs into XOTclIDE from Tcl-Interpreter. There are also a global variables inspector. Man can also starts tcl scripts from XOTclIDE or use project importing function.

DP: I am sure this is the kind of ingenious application needed to improve programming productivity. Many thanks for making it available!! Unfortunately I have no idea how to use it. I am a TCL programmer and wanted to edit, develop and debug TCL/XOTCL code efficiently. I do not know anything about OO or XOTCL and read all the manuals on XOTclIDE I could find. So far I have failed to figure out how to even start editing my existing TCL scripts. Do you have an suggestions or an idiot's guide I could follow to get me going or is this application too advanced for a novice user??

JMN: I too am having difficulty working out what to do with this program. All that aside - I feel that something is missing in the way of a high-level explanation of this IDE. I come to this program with the simpleminded notion of opening and closing text-files as the way to develop - so I guess what I'm missing is a basic overview of how all this class browsing relates to the files on disk - and indeed whether I can even use it on applications that aren't entirely XOTcl based...

Artur Trzewik 2003-01-09: Newly released version 0.50 of XOTclIDE has a new improved "User Guide" (also as PDF). The "User Guide" contains a tutorial (section Getting Started) that explains how to save and reload components for regular Tcl programmers and how they are related with tcl packages with many examples. There is also a new section that describes the importing of Tcl projects.

I believe that the main problem programmers might have with XOTclIDE is that it uses a different development paradigm: an IDE that is not a File or Script Editor. It does not manage Files or Scripts, but works in an interactive mode with a Tcl interpreter.

The normal development steps in XOTclIDE are

  1. Start IDE
  2. Load sources into interpreter (per source or package require). IDE recognize structure of sources and build components. (Component is quite equal to Tcl package)
  3. Change interpreter state by deleting, modifying, and creating tcl procedures
  4. Store interpreter state (all defined procedures) as tcl package or in version control system

Indeed, the developer does not need to care how components are stored on file system or into sql repository and do not operate directly on files.

XOTclIDE is also not the right tool to manage short Tcl scripts (with no defined procedures). The really power of it can be used if your projects are:

  • application more that 10000 lines of code
  • more than one developer
  • need for developing documentation tool
  • long maintenance (patches and improvements)
  • need for version control

Although there are also features that allow very comfortable evaluation of short tcl scripts (expressions). There are also Plug-In "Script Editor" that is ideal to programm short scripts and supports also Syntax Checking, Code Completion and directly Evaluation or Debugging.

escargo 2003-07-18: There is a fundamental semantic gap between software development using an editor (like emacs) and using a full-up IDE like XotclIDE. There is a much different philosophy, which requires much different thought and actions. Part of this stems from a more Smalltalk view of development.

"I mean, source code in files. How quaint. How 70's." (Kent Beck, Smalltalk Solutions'99 speaking about Java.)

If you are not already familiar with developing in such an all-encompassing IDE, retraining does seem to be necessary. I have downloaded Squeak Smalltalk several times over the years, but I have just never gotten into programming with it (not because of the language, which is as dead simple as Tcl in many ways).

anonymous 2005-09-22: I found a stop sign! - I was playing around with your IDE (kit 0.78) and for an exercise I decided to create a simple web browser using Tkhtml 2.0. Coming from Smalltalk, I started using your ::IDE Classes instead of writing new ones for toplevel windows etc. Following a topdown design strategy, I first created ::IDE::WebBrowser as a subclass of IDE::Browser, overwrote "specificInit" to setup the interior widgets and added a few callbacks to that class. Everything's nice so far, I can start the webbrowser inside the IDE. But when it comes to tclkit deployment, I get an error saying that Tkhtml isn't loaded. I needed 2 unmanaged packages, namely Tkhtml and Img, which I added using the deployment tool. For the IDE, to run the webbrowser I had to source kitten.kit and require the packages manually. I thought that would make Tkhtml available for the deployment tool, but didn't. Any suggestions? Thanks in advance...

Artur Trzewik:

I am glad that you hava not many problems with it and fond right places. Indeed I use IDE::BaseGUI classes also for another projects. Try IDE::MenuStruct too, it is quite powerful. It has for example rules based enablement management. Indeed tckkit deployer do not support including of other packages or files into deploying now. The feature is already listed in XOTclIdeWishes. The deploying works only for simple pure XOTcl, Tcl apps now and I am not happy with it. If you use tclkit you can create you template yourproject.vfs directory and copy the libs and files you need into lib directory, than use FileDeployer (accesible in "Configuration Map Browser") to copy XOTcl files form XOTclIDE into this directory. Finally use sdx.kit to get resulting kit. I use it such manner.

I have already thought to let XOTclIDE works together with kitten, as source and repository for additional tcl libs. The goal whould be enable XOTclIDE also for not Tcl-programmers, who do not want handle script files manually.


BTW: In Smalltalk I may send "show: 'Hello'" to the Transcript for the purpose of debugging. I tried "puts" (Might have been overwritten) but no effect. Is there an equivalent?

Artur Trzewik: In this point XOTclIDE do not work alike Smalltalks IDEs. Many developers have already complained about it. Transcript window is used in XOTclIDE only for internal messages and as workspace but the stdout or puts command are not redirected into it. You can use object :transcript to send messages to Transcript window "::transcript warning yourMessage" IDE::Transcript is also base window for all Workspace so you can create new Workspace and use it for output

    # Some development tricks about showing results or logs in XOTclIDE    

    # build own Workspace window
    set workspace [IDE::Transcript newBrowser]
    $workspace warning "Hallo World"

    # To show some developing result you can use also IDE::ResultBrowser
    IDE::ResultBrowser newBrowser "Hallo World"

    # If the result may be also XOTcl object or list of them use
    IDE::System inspectString ::transcript

    # Use powerfull Protokoll browser. It can display differently odd messages and
    # provide many additionaly functionality
    set protokoll [IDE::ProtBrowser newBrowser]
    $protokoll append "My Message 1"
    $protokoll append "Me Message 2"

    # you can also use fix named object but you must name the based tk window by creation
    IDE::ProtBrowser create ::mylog .myLogWindow
    ::mylog append "Log this"

In Windows version you can open "Tcl Console" from System menu to have output view. For Linux you can start XOTclIDE from shell, so you will see stdout outputs in shell. Perhaps it would be good idea to allow "puts" command redirection into Transcript by customizable option in this Browser. Up from version 0.80 you can also display 'puts' outputs in Transcript see: Transcript>Edit>Forward 'puts' outputs


escargo 2003-03-10:

To me since the parallel with the Smalltalk browsers seems to be a key differentiator of XotclIDE from other Tcl object systems.

  1. Refactoring Browser[2 ]
  2. SUnit work alike[3 ] (maybe covered above)

(You do say there is a "test framework" but it would be nice to know how it compares with SUnit.)

Artur Trzewik 2003-03-11:

  1. XOTclIDE contains Tcl/XOTcl parser that can create syntax trees. They are used for syntax highlighting and the syntax checker in XOTclIDE. The syntax checker is very similar to smallint. There is no refactoring browser with complex functions as moving methods in class hierarchy or manipulate class hierarchies. Some of refactoring functions are integrated directly in Component and Class Browsers. There are: searching after text, methods sender and methods implementors (in class, component and global contex), copying and moving classes/object in components. I know the smalltalk refactoring browser but I have not used it often and have no big experience with it. Another nice thing would be OO-Metrics (statistics about code distribution in OO-Structures) also with time aspect taken from version control (It can be simply implemented in XOTclIDE). It can be very useful to learn about the code structure and maturity without analysis of all sources.
  2. Indeed the Test Framework in XOTclIDE is very similar (almost equal) to SUnit. There are small differences. First XOTclIDE makes no difference between run time errors and asserts failures (The difference can be noticed in the error report). The test methods are also invoked in alphabetical order.

escargo 2003-09-02: I had a late night thought: Add a reaper function to XOTclIDE (something like wish-reaper or wiki-reaper. Then people running XOTclIDE would be able to use it to download code from this wiki (and potentially other wikis, I suppose) to try or import into the XOTclIDE environment. Potentially, you could even use a wiki as an exporting and importing source.

Artur Trzewik 2003-09-23: Version 0.51 has wiki reaper as additional plug in. After activating of this plug in ("Wiki Reaper") every editor have new additional menu (Edit->Wiki In) that can be used to receive tcl code from this wiki. see wish-reaper that code I have reused.


escargo 2003-09-29: I would be in favor of some documentation aids, ones that would help make Tcl code conform to the Tcl Style Guide.

I could also see a little one based on my own recent experience: A function that would wrap a code selection with if 0 { (and then remove it on command later); this would have been very useful when I was doing some experimental coding today.

Artur Trzewik 2003-10-11: XOTclIDE has integrated version control system. Indeed man do not need uncomment or if 0 { code areas to set some lines of code off for short time. Just delete it and than you want to reactivate it you can get to last version by menu method->version control->load previous. Also up from Version 0.56 XOTcl have function comment and uncomment.

Special Case: PostgreSQL access with XOTclIDE as a starkit on Knoppix with permanent home

Shin The Gin 2004-03-24: I just downloaded your starkit XOTclIDE.kit 0.59, having expectations about PostgreSQL database browsing. After a fresh start I noticed that the Sqlinterface "postgres" didn't show up in the IDEDBConnectDialog. After a little introspection I found a full path to "libpgtcl.so" in the class method "initializeInterface" of PgSql. Because Knoppix doesn't come with libpgtcl.so and libpq.so and it's not possible to install these libraries into proper places, I made a directory $HOME/lib and put them there. I also made a $HOME/bin and put tclkit there.

Edit your .bashrc and make sure, LD_LIBRARY_PATH and PATH contain $HOME/lib resp. $HOME/bin.

The solution goes as follows:

  1. Create a version control database. (Be patient, I chose SqLite)
  2. Start XOTclIDE with "Load all from version control...".
  3. Load package "xdobry::pgsql".
  4. Import the package into the version control and version it.
  5. Edit the class method "initializeInterface" for the class "PgSql", so that it sets "prefs" to hold the proper path to "libpgtcl.so". (See code below...)
  6. Accept the changes

For a Knoppix user it should look like this now:

PgSql proc initializeInterface {{prefs package}} {
    global errorInfo
    if {$prefs=="package"} {
        if {![catch {package require PgSql}]} return
        puts stderr "can not load package PgSql $errorInfo"
 
        # shin: replaced the path to libpgtcl.so
        set prefs /home/knoppix/lib/libpgtcl.so 
    }
 
    # shin: replaced "load $prefs" with {load $prefs}
    if {[catch {load $prefs}]} { 
        puts stderr "can not load library $prefs $errorInfo"
    }
}

The next time, start XOTclIDE with version control, load the version control database you just created and load the package "xdobry::pgsql" from the available packages of the version control (You have to select a specific version, not only the package name). Execute "Sqlinterface loadInterface postgres" and open the plugin "SQL Browser". If everything went well, it should show "postgres" as an option in the "Connect DB" dialog. Have fun!

Artur Trzewik 2004-03-26:

It is amazing how you get it run. Indeed XOTclIDE starkits does not supports postgres interface. The only interfaces that are in this kit are:

  • mysqltcl (Linux, Windows)
  • tclodbc (Windows)
  • sqlite (Linux, Windows)

To run version control on postgres you should use XOTclIDE source distribution (That was the plan). The problem with postgres-tcl was, that in RedHat distribution this interface can not be loaded per package require but only per load command.

There is also another way to manipulate XOTclIDE kit.

Load XOTclIDE??.kit and tclkit. You need also sdx.kit. Unwrap XOTclIDE

tclkit-win32.upx.exe sdx.kit unwrap XOTclIDE59.kit

Then you can just edit every file in XOTclIDE??.vfs. You can also start XOTclIDE from unwrapped. Run you tclkit-win32.upx.exe. Type in console

cd XOTclIDE59.vfs
source main.tcl

Beware you change to right directory. You can also write little tcl script that do this job. This works of course also for Linux.

XOTclIDE can be loaded directly from Version Control. Only 3 Components, that are needed for loading must be started from file system (or tclkit). That are: IDEStarter, xdobry::sql and your db-interface (for example xdobry::sqlite). So if you want to modify XOTclIDE for your needs, install Version Control witch XOTclIDE sources (standard option) and always start XOTclIDE from Version Control. In this way all modifications in XOTclIDE are updated immediately in Version Control. (That is the way I develop).

One disadvantage is that all changes will be lost if after your update of XOTclIDE. A better way is to program own Plug-Ins and control XOTclIDE only with XOTcl mixins and filters (see ExtendedDebugger Plug-In)

You can use Change Browser to produce changes list as Tcl script with your all changes. So you can see your changes and apply then in another installation.

Installing XOTclIDE on Mac OS X 10.3

Bill Paulson 2006-05-16

I've successfully installed XOTclIDE on Mac OS X 10.3. Since I ran into a few problems, I've prepare the following description of one way to do it. It assumes that you have an administrator login that allows you to install packages in /Library and /usr/lib.

The three parts you need are the Tcl/Tk packages, XOTcl 1.4.0, and XOTclIDE itself. First, you need an up-to-date version of Tcl and Tk. The easiest way to get this (if you haven't done it already) is to install the Batteries Included 8.4.10 package from Daniel Steffen. This download includes many Tcl and Tk packages, all bundled with a nice installer.

Version 1.3.6 of the XOTcl language in the Batteries Included distribution doesn't seem to support XOTclDE, for reasons I haven't figured out. This can be fixed by installing XOTcl 1.4.0. To do this, you'll need to download the whole package from http://media.wu-wien.ac.at/ , compile it and install it. In the Terminal, cd to xotcl-1.4.0, type "configure", then "make clean", then "sudo make install". This will install XOTcl 1.4.0 in /usr/lib.

Next you'll need XOTclIDE itself. Download it from http://www.xdobry.de/xotclide . XOTclIDE doesn't require any further installation.

Once you've done all this, you're almost there. The only remaining problem is that the installed Wish application doesn't look in /usr/lib for the XOTcl package, so you need a small script to let Wish know where to look. Although I'm not sure of the best way to do this, the following works:

set auto_path "/usr/lib"
tclPkgUnknown XOTcl 1.4.0
package require XOTcl 1.4.0
namespace import xotcl::*
source XOTclIDE.tcl

An application that includes all of this stuff is available at http://homepage.mac.com/billpaulson/FileSharing7.html . It's based on the Wish And Go application, which includes a large number of extensions inside the app, along with complete Tcl and Tk frameworks.

XOTclIDE with XOTcl 2.0

XOTclIDE uses in version up to 0.84 absolute object names as method names for the meta-data object “@”. Version 0.85 of XOTclIDE changed this. If you want to use code genareted with XOTcl0.84 with XOTcl2.0 you need to convert the code by following script. Otherwise the meta-data (comments, catagories) is lost, when you would edit the files with XOTclIDE

perl -pi -e ‘s/^@ ::/@ /g’ `fgrep -rl ‘@ ::’ .`