Updated 2013-08-30 14:54:23 by RLE

Shin The Gin 2007-01-16 - This page was started on TclTalk and then put here to grow.

LES Why do reports and comments on TclTalk have to be in a separate page? Why are you too unpersoning wikit?

LV Mixing reports, comments, and technical information for a software item makes a large, oftimes confusing page. It seems like a reasonable approach to separate things and this seems as good a way as any.

Shin The Gin - Oh thanks Larry. Actually I found some sort of template for Tcl/Tk apps here, which I took to create the TclTalk page. Then I saw this page growing and found it to spoil its template character, so I made this one.

Amazing, it looks like XOTclIDE (also Smalltalk like IDE but based on XOTcl).

Shin The Gin - Yes! I like XOTclIDE a lot. But TclTalk is more targeted to the novice and/or teacher of Tcl/Tk, and therefore I prefer to stay procedural for now. The only OO-alike encapsulation of code with TclTalk is done with namespaces and commands/subcommands, which should be all right for novices and small projects.

Artur Trzewik - XOTclIDE seems to be, for most users, total overkill for an application. So it might be indeed a good idea to have a small nice GUI to play with the interpreter. Also Tkinspect and tkcon offers some functionality of this kind, but Smalltalk is indeed the best model. Why simulate a 70's like console if one has the text-widget?

Shin The Gin 2007-01-03 - Version 0.2.2 is online now. It contains only bug fixes and the [nsb] package at version 0.3

Shin The Gin 2007-01-04 - Version 0.2.3 is out. The system browser's title bar is more informative and some bug fixes.

Shin The Gin 2007-01-06 - TclTalk is at version 0.2.4 now. Better logging of changes. Better creation of new namespace variables and procedures using the system browser. Package creation now asks for a target directory and has better variable initialization support (see ::nsb::initializeNamespace). The menubar in a tutorial window is gone. Some bug fixes and a little intro.

escargo 11 Jan 2007 - I just downloaded and tried to run the 0.2.4 kit. It was very strange. When I tried to select it on my XP Pro desktop, it became unselected. It would not accept being clicked on to become selected. If I used Windows Task Manager to switch to it, it became highlighted. When I tried typing to it, it was unresponsive. I had to use the Task Manager End Task button to kill it.

Shin The Gin 2007-01-12 - Oops, I shouldn't have put the about box before the start of the program. It seems that it's just not visible on your screen but has the focus. Please be patient. Version 0.3 is underway. It will also handle the tree structured namespaces better when creating packages, is more informative in the "System Transcript" and will present an early version of a "Project Manager". Also the namespaces that make up TclTalk will be reorganized as a tree like:
  ::tcltalk
    ::tcltalk::nsb
    ::tcltalk::prj
      ::tcltalk::prj::mgr
    ::tcltalk::ws

I don't have a Microsoft license to test TclTalk against MS-Windows. Maybe someone likes to cooperate on this?

Shin The Gin 2007-01-13 - Ok, let's enter level 0.3 with version 0.3a. I haven't done any testing on MS-Windows yet but it runs at least on Ubuntu-6.06LTS, SLAX 5.1.8 and Debian (testing). TclTalk is now able to create new functional starkits when it finds your sdx binary. This mechanism is called Turnkey deployment. TclTalk simply replaces its startup code with yours and spawns a copy of itself to disk. Give it a try!

You'll always find the latest version at http://eris.dyndns.info/files/

AET 15jan06 - Still a problem starting on Windows XP. Workaround:
  Start the .kit
  Click on another application window (focus goes away from TclTalk)
  Click back on TclTab (focus disappears from everywhere!)
  Alt-Tab & hold down the Alt key.  You should see an unknown
    application (DOS-style icon) next to the Tk Icon of TclTab in the dialog.
    Still holding down the Alt key, press Shift-Tab.  Nothing
    seems to change, but the focus now moves to the invisible window.
  Alt-F4 to kill that window.  A Tk toplevel appears.  Ignore it, and
    you're in business.

escargo 14 Jan 2007 - One bit of help that I need is an answer to a basic question. If I create a snippet of code, and then select "Do It", what do I have to do to make my code produce output in the Transcript?

Back in version 0.2.3 (the last one where focus on Windows XP worked the right way), I tried setting variables and printing their values, but I never got it to do something that I understood. The "Do It" feature reminds me of Squeak Smalltalk (which is surely intentional). But I was unclear about what state the workspace was in and was never really happy about saving it.

Shin The Gin 2007-01-15 - Hi, please try version 0.3c from http://eris.dyndns.info/files/old/tcltalk-0.3c.kit !

TclTalk starts as follows

  1. Load packages
  2. Load the change log
  3. Request your initials
  4. Open the system transcript

Maybe the input box which requests your initials is the problem under windows?

@escargo: The "Do it" option doesn't change anything within your workspace, as long as your evaluated code doesn't either. If you want to see the result of an evaluated block of code, then you should use "Print it" instead, which in return changes the contents of your workspace.

To output something to the transcript, please use ::tcltalk::ws::report <your string> - Perhaps there should be another option on the context menu of a workspace that says: "Report it" and prints the evaluation result on the transcript?

escargo 15 Jan 2007 - I certainly think it needs to be readily available. While it's nice that some things produce effects (like making buttons, etc.), many things that want to be done need to produce visible and persistent results. Think of how you might use tclsh (with or without TkConsole). I often use it to set variables that I then feed to code that I have sourced. Then I can tell if the code does what I expect. With a workspace (or image), I would write something that defines a proc, and then define data to feed to it. Then I would look at the results, and see if the code was doing what I wanted. That's maybe now how one might use the browser and transcript with TclTalk, but I would like to try. Making output of computations readily available and changing the state of the image are integral.

Shin The Gin 2007-01-15 - Oh yes! I see! You should give version 0.3e a try, which is a descendent of 0.3d.

There is a version 0.3d, which I could fix a little against XP today and a version 0.3e including the "Report it" option. see http://eris.dyndns.info/files

escargo 15 Jan 2007 - My, haven't you been busy. I grabbed 0.3e (shortly after grabbing 0.3d), and started it. It seems to work fine, but I am puzzled by how much the sizes of the different versions vary. Why would the e version be 29K and the d version 40K? Usually programs get bigger, not smaller.

Shin The Gin 2007-01-15 - :) @ escargo

Actually I develop TclTalk using TclTalk. It's A piece of rock in the hands of the sculptor. Some resulting starkits are smaller, because I created them from a source directory. Those which are bigger are released from TclTalk itself. Maybe there is a function to compress a writable starkit?

escargo 15 Jan 2007 - What would be your recommended way to change the puts command to direct output to the Transcript? Is it something that could be easily added to the system menu? (Think of what you might have happen to a user doing "parray ::env". Wouldn't it be nice if that could just work?)

Shin The Gin 2007-01-15 - Well, actually I would use the system browser. Just click on "::" in the namespace tree and then on env in the variables list.

Artur Trzewik - At look nice. Is system browser designed to be only single instance? I use usually two instances - one for editing and the other for browsing and introspection. But it can be that many instances will be confusing for oo-resistant users (and it makes some problems by synchronization of views). So why menu System Browser->System->Open System Browser. I miss also undo in text widget (it is just option setting in Tk8.4) and shortcut for 'accept'. A general suggestion- one should be able to use keyboard only. System browser ("namespace browser") is good idea, perhaps I will reuse it in my app. Functions "Do It", "Show It" are typical Smalltalk, For Tcl to be usable, a "Substitute It" that is shortcut for "subs" command would also be useful.

Shin The Gin 2007-01-15 - Thanks for your response!

I've been thinking of multiple system browsers, but left it for last. Synchronization would be easy with namespace globals and traces. I also like the idea of an option "Subst it", although I'd rarely use it.

There are plans to write 'yash' (Yet Another Syntax Highlighter) to be used with workspaces and the system browser. And I have to make more clear that the change log is only affected by the system browser and not by activities using a workspace, which in return is a gap that doesn't exist in Smalltalk. Maybe Tcler's wouldn't mind, but Smalltalkers coming to Tcl/Tk surely would.

I haven't had a look at "Undo" yet, but I'll stay tuned :) - When I want to undo something here and now, I open the change log and do it by hand (copying an older version back into the system browser), but that could be hidden away with the "Undo" function indeed.

AT - sorry. I have mean "micro" undo, only in one text window. So I can undo with Control-Z some editing code between accepting it. After "accept", the text undo buffer should be cleaned. Undo of CHANGES log (for example deleting or modifying a proc) is another theme. It would lead to a version control system. I think [Squeak] uses so-called change sets to deploy patches and implement base version control, but I do not know how exactly . Indeed the changes log is quite brilliant and interesting idea for a persisting system (like some database concepts). Another one thema: I am also not sure if one needs to trace the proc command to get all changes of procedures. It is because the user can define and modify procedures simply by using "Do it" in Tcl.

STG - Hm... - I must think about that. set, array et al must be traced then also. There should be two "undos". One saying "Undo" and one saying "Revert to..", giving a nice list of available hits on the change log.

AT - I think that persisting variables on the flow is quite problematic area, because there are many non-transient variables (example: file handles, windows handles which need initialization). There should be a difference between init state and application state, or definition variables and working variables. Data in variables are also used to define structures or meta programing. There is probably a need for namespace init methods to initialize that variables. It could be a naming convention. Smalltalk uses for its class method initializeAfterLoad. In that background the defining of variables in current implementation could be the best solution.

STG - Yes. Been there. Done that :) (See ::tcltalk::initializeNamespace ...)

When creating a namespace and then adding variables to that namespace, TclTalk could easily fetch their declaration from within ::tcltalk::nsb::accept and take care of <your namespace>::initializeNamespace to add and delete variables as one would go on developing. I'll put that into TODO. I'm not after the complete concept of an image like Smalltalk does, but just keeping track of things done with the browser. One can play around with workspaces and then get real using the browser. It could be easily understood by a novice, I think.

AT - I found a small bug. "Do it" and "Print it" use simple eval in tcktalk::ws namespace. It makes some problems with namespaces. Try to "Do it" in sequence "set test 0" "set test". Better solution is "namespace eval :: ...". It is quite good that after "Print it" the returned string is selected, so one can quick copy or delete it. There are also same probably unintentional side effect by using :tcltalk::ws::showsTutorial $w in "Print It" when it is used from system browser. Please remove this text sometime from the wiki because it pollutes this page.

STG - Thanx for testing. Evaluation of code with "Do it" now takes place in the root namespace and the result of "Print it" gets selected for further deletion or similar action. Yes, the side effect in :tcltalk::ws::showsTutorial $w is only weakly controlled by the widgets name, as tutorial widgets are named starting with ".tut".

escargo 16 Jan 2007 - In the .03e version, I can reproduce the following problem.

  1. Start the program
  2. Provide initials
  3. Go to the System Transcript and open a System Browser
  4. Go to the System Browser menu and select File, and then Open..
  5. An error dialogue appears:
 bad option "edit": must be cget or configure
 bad option "edit": must be cget or configure
     while executing
 "$w edit modified"
     (procedure "::tcltalk::ws::canClose" line 2)
     invoked from within
 "::tcltalk::ws::canClose $w"
     (procedure "::tcltalk::ws::openFile" line 2)
     invoked from within
 "::tcltalk::ws::openFile [focus]"
     (menu invoke)

STG: Oh yes, I found it!

In terms of usability, I'm not exactly sure what opening a file in the transcript or system browser is supposed to do.

STG: Well, to me it seems useful to open a file in a system browser, copy some text, click on a procedure to be shown and insert the copy buffer. I use it to copy from the change log back into the system. I know this spoils the proposed work flow. I need to rework "File->new" and "File->Open...", so that "File->Open..." always creates a new window.

escargo - I guess because I see the System Browser being used for introspection of the system, opening a file from its file menu makes less sense to me than opening a file in the Transcript (where I expect it to be available for editing). In general, I would expect System Browser file commands to relate to the system (as a whole). Certainly you want to be able to open a file (for editing or to copy and paste), but that to me makes more sense to do in a separate window.)

When I open the system browser on OS X the scrollbar and window oscillate until I resize the window.
  TclTalk 0.3e running on Tcl/Tk version 8.4.10

JBR

STG - Thank You All For Testing!!!

@JBR: I don't really see a reason for this, but I changed the Browser's appearing to set a reasonable width and height after its creation. So I hope to simulate, what you where doing by resizing.

@escargo: I could try to give up on using only one instance of a system menu. My idea was to have one always present system menu in every window and put the special functions into the context menus of each subwindow, accessible on mouse button 3. Is it not portable to systems other then X11? Does the MacMouse still have only one button? I know common wheel mice come with 3 buttons.

Shin The Gin 2007-01-16 - Version 0.3 is done.

Shin The Gin 2007-01-24 - Give version 0.3.2 a try! The backup of changes is managed now. Selecting a namespace variable filters the shown procedures in the browser now. Some bugs were fixed and there shouldn't be any new ones :)

Shin The Gin 2007-01-24 - I'm at 0.3.4 now.

Version 0.3.4 is a streamline of the concept and now supports multiple browsers. Browsers can now collect references of a selected procedure and show them in a references browser.

Please visit: http://eris.dyndns.info/

escargo 8 Feb 2007 - I found the newer 0.3.4.1 version on the web site. I downloaded it, and gave it a little test drive. See if you see this behavior:

  1. Start TclTalk.
  2. Provide initials.
  3. Open a browser.
  4. Click on the ::tcltalk::ws namespace entry in the first window.
  5. Click on the wsActiveWConfig entry in the second window (populated after clicking on the namespace).
  6. See an error dialog box.
  7. Read the contents of the log file created from the dialog box.
 can't set "::tcltalk::browser::CURRVAR(.brw_1170948608)": can't read "cv": no such variable
 can't set "::tcltalk::browser::CURRVAR(.brw_1170948608)": can't read "cv": no such variable
    while executing
 "set ::tcltalk::browser::CURRVAR(.brw_1170948608) [.brw_1170948608.space.top.vars get [.brw_1170948608.space.top.vars nearest 22]]"
    (command bound to event)

STG 2007-02-08

@escargo: I know about this problem. The selected variable is only declared but never initialized. You'll get the same erroneous result if you select the variable ::tcltalk::ws::wsThemesMenu (a relick from my tests using tile).

If you "Do it"
 set ::tcltalk::ws::wsActiveWConfig 0

Then that error will be gone. I have no idea how to test the contents of an uninitialized variable in Tcl. Any suggestions? - RS 2007-02-09: See info exists

STG - Oh yes! Thanx. I'll release 0.3.4.3 A.S.A.P - 0.3.5 will support simple syntax highlighting :)

rgf 2007-02-08 I downloaded version 0.3.4.1 and tried it with a linux tclkit (8.4.4). When I tried "::tcltalk::nsb::create" 'DoIt' (second window of tutorial) I received the message 'Error: invalid command name ::tcltalk::nsb::create' ... any suggestions as to what I'm doing wrong? Thanks!

STG 2007-02-08 - Oops - I have to update the tutorial files to reflect the latest changes. TclTalk can open multiple browsers now, so the equivalent code should read:
  ::tcltalk::browser::create .browser[clock seconds]

You better get version 0.3.4.2 available now :). It also corrects the fault of giving a wrong command representation of variables that contain lists. They had no surrounding brackets.

PS: If you like the starsync concept, you can test with your sdx executable:
 sdx update -from http://tcltalk.ath.cx/sync tcltalk.kit

Shin The Gin 2007-02-09 - Hi, before releasing version 0.3.5 (with simple syntax emphasizer) I tried it on a machine running Windows-XP today and was shocked! - The windows file selection dialog cannot browse into the vfs of TclTalk! - I understand that Tcl/Tk uses Windows's system dialogs, but how can I circumvent this incompatibility? Please help...

escargo - comp.lang.tcl, the vfs page, or the starkit page might be better places to get an answer to the question. Just what precisely is the file selection dialog supposed to be able to see that you think it should but it does not?

STG - It's done, thanx. To navigate TclTalks vfs I had to use ::tk::dialog::file:: instead of tk_getOpenFile

LV 2007 Aug 29 Hey Shin, did you report this problem with tk_getOpenFile at the Tcl.sf.net bug report web site?

STG: Hello Larry! Is it really a bug? I mean these two dialogs are quite different. I don't think that anybody can get the MS-Windows system dialog to do new things like browsing into alien file systems.

LV I guess my thought was that it probably should be documented somewhere. Maybe a bug isn't the best approach - maybe update something here on the wiki reminding others of the gotcha.

Shin The Gin 2007-02-09 - You may now pick version 0.3.5 with a simple syntax emphasizer. It also navigates through TclTalk's vfs on windows now by using the scripted file selection dialog of Tcl/Tk (Ugly but functional).

escargo 9 Feb 2007 - I found 0.3.5 version on the web site. I downloaded it, and gave it a little test drive. See if you see this behavior:

  1. Start TclTalk.
  2. Provide initials.
  3. Open a browser.
  4. Click on the ::tcltalk::ws namespace entry in the first window.
  5. Click on the wsEditMenu entry in the second window (populated after clicking on the namespace).
  6. See an error dialog box.
  7. Read the contents of the log file created from the dialog box.
 can't set "::tcltalk::browser::CURRVAR(.brw_1171047120)": bad switch "-all": must be --, -backward, -count, -elide, -exact, -forward, -nocase, or -regexp
 can't set "::tcltalk::browser::CURRVAR(.brw_1171047120)": bad switch "-all": must be --, -backward, -count, -elide, -exact, -forward, -nocase, or -regexp
    while executing
 "set ::tcltalk::browser::CURRVAR(.brw_1171047120) [.brw_1171047120.space.top.vars get [.brw_1171047120.space.top.vars nearest 37]]"
    (command bound to event)

STG It doesn't fail here. Please fetch a fresh copy, or send your copy to tb(at)eris.dyndns.info

escargo - I am operating in a Microsoft Windows environment (much as I would prefer otherwise).

rgf 2007-02-12 I'm trying version 0.3.5; working my way through the tutorial to "Tutorial: 02 SystemBrowser" I perform the first select/DoIt and open a Browser. Any button 1 presses in the right two columns of the browser generates an error very similar to that reported by escargo. My OS is Redhat linux, and I'm using tclkit 8.4.4.

STG - Ok, I found it. The option "-all" of the subcommand "search" of a text command (e.g. .txt search -all "myvar") didn't exist before Tcl/Tk v.8.5. I have to test against v.8.4 again. Sorry, that will go into 0.3.5.1 coming soon.

Sarnold - What kind of license applies to this software?

STG @sarnold: Hm.. - I haven't decided yet. I want to give something back to the open source community, without which I wouldn't be able to do so. So, up to now it's completely free as in "Freibier!". What kind of license would be appropriate? Any suggestions?

escargo 16 Feb 2007 - Obvious choice would be the same license as used by Tcl itself.

STG - Sounds reasonable. So that would be the GPL ?

Short answer is no. There is no separate page for it, but it's discussed here: Licenses.

STG - Phew - I'm a little confused. Does TclTalk make its source available with its browser or do I have to offer a full source tree to meet the conditions for OpenSource licenses?

LV Tcl uses the so-called BSD license agreement. After reading the Licenses page, you can see there's nothing in there about source trees, etc. The BSD license says you can use (and distribute) Tcl however you wish. You can make money selling Tcl if you want. But you have to leave the original license attached to all the original files.

Shin The Gin 2007-03-05 - Version 0.3.5.2 is available now. This was tested on both versions of Tcl/Tk, 8.4 and 8.5. I couldn't test on windows yet, but at least on Ubuntu 6.10 and SLAX 5.1.8.

escargo 5 Mar 2007 - Both of the issues that I reported have been resolved. I'm running this on Windows XP SP2.

STG - Yeahh... - There's also a little hidden thing in ::tcltalk::wconf::switchActive. "Do it" it with a boolean "true" and get a little configuration browser on <double-mouse-2> over a certain widget. It's meant to be a helper for interactive GUI scripting :)

Shin The Gin 2007-03-15 - 0.3.6 is out! - There are two immediately visible changes. First, I switched to Ctext from George Peter Staplin and second, I included Richard Suchenwirth's Simple search and replace. A CHANGELOG can now be viewed from the about box and namespaces which were packaged using the browser are now loaded at startup time.

rgf 12 Jun 2007: I tried the example using 'Create turnkey starkit...' but couldn't find the result (I assumed it would be a *.kit file in the same directory). Is this menu entry implemented yet? STG - Hello and thank you for your interest. This sounds as if you are running TclTalk on Windows. What does the command pwd in TclTalk tell you where you are? Please look there. Oh, and Please make sure, that TclTalk can call your copy of sdx.exe. Maybe you have to adjust your PATH.

rgf: I'm running TclTalk 0.3.6.1 with (tclkit) tcltk version 8.4.4 on linux. Executing "puts [pwd]" returns the directory I started tcltalk in, which also contains a copy of sdx.kit but the current directory ("./") is not in my path. I wasn't aware tcltalk required an external copy of sdx. - STG - Well, I allready tried to decompose the sdx utility, so I can use it from within Tcl/Tk, but failed. I dream of a procedure like ::sdx::wrap {source-dir kitname options}, so TclTalk could live without having the complete utility available.

rgf 18 Jun 2007: I looked at the code for '::tcltalk::turnkey' and it appears you 'exec' sdx instead of sourcing it. Since my version of sdx is a kit I would usually 'source' it instead.

Shin The Gin 2007-08-29 - Please give version 0.3.7 a try. It doesn't depend on external sdx.exe or sdx.kit anymore when creating turnkey starkits. See http://eris.dyndns.info/ ...