Tcl browser plugin revived

470 views
Skip to first unread message

EL

unread,
Oct 4, 2015, 12:32:25 PM10/4/15
to
Hello,

I have taken the Tclplugin sources and put some sparetime work into it. Mainly I fixed some bugs and put in an enhancement to make Tclets scriptable and interact with the browser, document DOM and Javascript. Apart from that I created an MSI setup for Windows.
Its still NPAPI and works with browsers that support NPAPI. So far I haven't done anything for Linux or Mac OSX... (I am sure that it will compile and run on Linux with minor modifications, but OSX is more difficult).

From the README:
Version 4 of the plugin contains some minor bugfixes for compatibility with
Tcl 8.5 and 8.6, restores the old functionality and make old Tclets
working with new Tcl versions.
Apart from that it includes an enhancement for communication with the
browser NP runtime, i.e. "scriptable object". This enables Tclet authors
to access the document DOM, read and modify elements within the document
and call javascript functions from Tclets. It also enables access to
special functionality exported by the browser through NPR, such as the
console or browser storage etc.
As of now the plugin version 4 works on all mozilla Gecko based browsers,
such as firefox, seamonkey (everywhere), kmeleon,... (windows), icecat,
epiphany, ... (linux), etc. The pluginhostctrl activex control can be
restored in the near future to make it work on IE, this is not yet done.
The plugin works not with Google Chrome, Opera and the like, since these
browsers are not supporting anymore (or phasing out the support of) NPAPI.

The sources are here in a fossil repo:
https://fossil.e-lehmann.de/tclplugin/
As of now this is the only place to get the plugin in this version. The MSI setup is checked in for convenience, in installers/msi/.

If you could use it, it would be great if you test it and leave me feedback... Eventually it could then also be made more official and updated on the plugin webpage http://tcl.tk/software/plugin/.

--
EL

Эдуард Зозуля

unread,
Oct 5, 2015, 1:40:19 AM10/5/15
to
Very good news !

Respect !

Harald Oehlmann

unread,
Oct 5, 2015, 3:57:43 AM10/5/15
to
Hi,

Epic message, great work !
Couldn't we get the fossil to the core fossil repositories at core.tcl.tk ?

Thank you,
Harald

EL

unread,
Oct 5, 2015, 4:52:21 AM10/5/15
to
Am Montag, 5. Oktober 2015 09:57:43 UTC+2 schrieb Harald Oehlmann:

> Couldn't we get the fossil to the core fossil repositories at core.tcl.tk ?

Sure we could ;). I'd be happy to move it over, just need to know the details.

Also important would be a download location for the release, imho. I think the source can live everywhere (on core.tcl.tk, chisel, my linode, wherever) but the download should be in a more "official" location, so that people know they can trust the software.

--
EL
Message has been deleted

Luc Moulinier

unread,
Dec 23, 2015, 5:55:39 AM12/23/15
to
Dear Erik,

Thank you very much for this effort ! It will be just great to have the plugin in order to web port our Tk applications.
I installed the plugin on Windows 7 and uses Firefox. When I tried the 'tcletsh' in tcletsh.html page, I got en eror 'invalide command name policy'. I commented it in tcletsh.tcl, then I got the error 'can't find package Tk'...
Tcl/Tk v8.6.1 from ActiveState is intalled and running.

If I understand well, the "policy' command is delivered by the plugin. And it seems the plugin is not seeing the TckTk installation ...

Do you know what's happening here ?

Thanks again for your efforts !
Luc

Luc Moulinier

unread,
Dec 27, 2015, 11:34:22 AM12/27/15
to
Le mercredi 23 décembre 2015 11:55:39 UTC+1, Luc Moulinier a écrit :
> Dear Erik,
>
> Thank you very much for this effort ! It will be just great to have the plugin in order to web port our Tk applications.
> I installed the plugin on Windows 7 and uses Firefox. When I tried the 'tcletsh' in tcletsh.html page, I got en eror 'invalide command name policy'. I Can someone send me Erik's email address ? Many thanks !
Luccommented it in tcletsh.tcl, then I got the error 'can't find package Tk'...

EL

unread,
Jan 3, 2016, 12:40:58 PM1/3/16
to

Did you use the msi installer? It should provide an all-in-one installation also with a recent tclkit.dll (8.6.4), there is no dependency on ActiveTcl or any other external Tcl installation. The policy command is part of the plugin package, which is also installed with the msi.
There are certain environment variables however, that enable the use of external Tcl. When TCL_PLUGIN_DLL is set to your ActiveTcl, and it doesn't know the plugin package, then you get the mentioned errors. It's best to unset those env variables and start out with the kit.dll, if you ask me ;-)

--
EL

ifind...@gmail.com

unread,
Jan 22, 2016, 1:08:56 PM1/22/16
to
El,

Thanks for the work. I have been distributing a NAPI plugin for my extension, TclFltk, for a number of years, but only on UNIX systems. I don't really use Windows any more except for when I am forced to fix my relative's machines.

I would like to modify your plugin to support my own package on Windows and ultimately add it to my Windows distributions for TclFltk. Any issues with that from your side?

Reguards, Iain F.

EL

unread,
Jan 23, 2016, 4:02:08 AM1/23/16
to
<ifind...@gmail.com> wrote:

> Thanks for the work. I have been distributing a NAPI plugin for my
> extension, TclFltk, for a number of years, but only on UNIX systems. I
> don't really use Windows any more except for when I am forced to fix my
> relative's machines.
>
> I would like to modify your plugin to support my own package on Windows
> and ultimately add it to my Windows distributions for TclFltk. Any issues
> with that from your side?

No, you are welcome :). It's BSD license...
Theoretically it would be possible to use it for your Unix distributions
also, but the code for that is not yet finished. If you want to implement
that and get the plugin running on Unix/Linux, I'd be glad to accept a
patch.


--
EL

ifind...@gmail.com

unread,
Jan 23, 2016, 1:56:37 PM1/23/16
to
On Sunday, October 4, 2015 at 12:32:25 PM UTC-4, EL wrote:
EL,
Thanks. It may take me a while to get to it, but I will let you know the results.

GBNeil

unread,
Feb 12, 2016, 5:51:06 AM2/12/16
to
Thanks for the great work!

I'm having the same problem as Luc: running ActiveState 8.6.4 on Win7. I ran the MSI but also get 'invalid command name "policy" while executing "policy home" file...\tcletsh.tcl" line 2'

The TCL_PLUGIN_DLL is not set as an env. var.

Any ideas pls?

GBNeil

unread,
Feb 12, 2016, 5:58:01 AM2/12/16
to
Sorry, forgot to mention I'm using the latest 64bit Pale Moon (NPAPI compat) :)

GBNeil

unread,
Feb 12, 2016, 5:59:41 AM2/12/16
to
Hi Luc, I'm having the same problem (on same setup) as you. Did you resolve it pls?

EL

unread,
Feb 19, 2016, 3:22:04 PM2/19/16
to
GBNeil <neil_ha...@fastmail.co.uk> wrote:

> I'm having the same problem as Luc: running ActiveState 8.6.4 on Win7. I
> ran the MSI but also get 'invalid command name "policy" while executing
> "policy home" file...\tcletsh.tcl" line 2'

Do you have any other 'funny' Environment variables? TCL_LIBRARY_PATH or
such? Evtl this points to a location where the plugin package is not...


--
EL
Reply all
Reply to author
Forward
0 new messages