Accessing the env

45 views
Skip to first unread message

Alan Schmitt

unread,
Nov 16, 2011, 6:14:36 AM11/16/11
to jstal...@googlegroups.com
Hello,

As I'm exploring JSTalk, I saw some scripts where one could find in the environment the url of the running script, or who called the script.

I'm trying these examples in the editor, such as:

var script = [jstalk env].scriptURL.path();

but I always get an error:

"Line 0, TypeError: 'undefined' is not a function (evaluating 'jstalk.env()')"

I'm clearly not understanding what the "jstalk" identifier stands for. Is it a global identifier? Is it supposed to exist in JSTalk Editor?

Thanks,

Alan

Gus Mueller

unread,
Nov 16, 2011, 4:03:50 PM11/16/11
to JSTalk Dev
On Nov 16, 3:14 am, Alan Schmitt <alan.schm...@polytechnique.org>
wrote:
It's a global var (and it really should be in it's own namespace). It
should be there though- what version of JSTalk Editor are you using?

-gus



Alan Schmitt

unread,
Nov 17, 2011, 2:45:21 AM11/17/11
to jstal...@googlegroups.com

I'm using 1.0.

Alan

Gus Mueller

unread,
Nov 17, 2011, 12:39:13 PM11/17/11
to jstal...@googlegroups.com

The latest release is 1.0.1, but you might try the latest preview build as well:
http://jstalk.org/download/JSTalkPreview.zip

-gus

--

August 'Gus' Mueller
Flying Meat Inc.
http://flyingmeat.com/

Alan Schmitt

unread,
Nov 17, 2011, 12:47:24 PM11/17/11
to jstal...@googlegroups.com
On 17 nov. 2011, at 18:39, Gus Mueller wrote:

> The latest release is 1.0.1, but you might try the latest preview build as well:
> http://jstalk.org/download/JSTalkPreview.zip

Thanks, it works. Sorry of the confusion, I had another version of JSTalk from 2009 in EagleFiler, and somehow it was that one that was launching.

Thanks again,

Alan

Reply all
Reply to author
Forward
0 new messages