Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using Javascript from Tcl?

186 views
Skip to first unread message

Torsten

unread,
Sep 27, 2007, 10:26:51 AM9/27/07
to
Hi all,

I have a Tcl/Tk program (not a web browser) and want to run small
JavaScript scripts from it. These script shall have access to the
data in my Tcl/Tk program to read/write/modify them via a defined set
of Javascript functions like let's say SetMyValue("key","value") and
GetMyValue("key").

Is there a solution for this available?

If not, if have the following idea: I could take a JavaScript-C-Engine
like e.g. SpiderMonkey, extend it with some functions (SetMyValue,
GetMyValue) wrap Tcl bindings around and build it as a library (.so
or .dll). But I think that it takes some time so I'm looking for
alternatives.
I'll appreciate any advices.


I've already proposed to use Tcl instead of Javascript but without
sucess ...

Thanks in advance
Torsten

Rivotti

unread,
Sep 27, 2007, 1:18:08 PM9/27/07
to

As far as I know, there is no way YET to communicate with JS. maybe
you are the one we have been waiting for ! says the great morph.
Please let me know if you managed to find an anwser.

Georgios Petasis

unread,
Sep 27, 2007, 2:18:42 PM9/27/07
to Torsten
If you plan to use a C library from Tcl, why don't you try swig?
It can easily create the wrapper code for you...

George

O/H Torsten έγραψε:

tom.rmadilo

unread,
Sep 27, 2007, 8:41:51 PM9/27/07
to

AOLserver has a javascript module which uses SpiderMonkey:

http://aolserver.cvs.sourceforge.net/aolserver/nsjsapi/


Torsten

unread,
Sep 28, 2007, 2:08:23 AM9/28/07
to
> AOLserver has a javascript module which uses SpiderMonkey:
>
> http://aolserver.cvs.sourceforge.net/aolserver/nsjsapi/
It looks good at the first glance.

Thanks
Torsten


0 new messages