Showing posts with label activestate. Show all posts
Showing posts with label activestate. Show all posts

Saturday, September 4, 2010

A default O-O package for Tcl 8.6: TclOO

 
While the link for O-O Tcl looks to be dated, the page for Tcl 8.6 releases is current.

I have a bias for XOTcl, but I will try to be open-minded when 8.6 gets out of beta.

TclOO is intended to offer classes and objects as a Tcl package rather than as an ad hoc extension to Tcl and Tk.  Some "patterns" folks will like the hiding of new in class in favour of create as the class declaration idiom - but instances are created via a command block substitution with the new word as in
set obj [MyClass new]
A google of TclOO and Tcl failed to get me past beta1 links to Tcl8.6b2 links.

But the link to the PDF on the new engine looked interesting.

This link at tcl.tk may be the final URL for core TclOO.

Over at activestate.com Tcl remains at 8.5.8 with a release number of 8.5.8.2 as of today.

Tcl 8.5.9 added the ttk::spinbox command.

A google on "Tcl 8.6" gives some useful links such as that to Mark Roseman's 8.6 page (he is the author of the tutorial for Ttk or Tile/Themed Tk.)

Wednesday, September 9, 2009

Tcl browser plugin v3 (from ActiveState)

There are some discrepancies in info about embedding Tcl/Tk since the change to plugin v3.

I tested against up-to-date Chrome, Opera, Safari, IE8, FireFox 3.5 and Amaya

My result is that given some script XYZ.tcl ONLY the following worked across all:

<OBJECT
ID="PluginHostCtrl"
CLASSID="CLSID:14E78123-A693-4F27-B6EE-DDDE18F93D3A"
WIDTH="400"
HEIGHT="220"
>
<PARAM name="type" value="application/x-tcl"/>
<PARAM name="pluginspage" value="http://www.tcl.tk/software/plugin/"/>
<PARAM name="src" value="XYZ.tcl"/>
</OBJECT>

Getting the plugin recognized by each browser was slightly problematic: IE 8 appeared to just ignore the XPI.