helper.js problem

105 views
Skip to first unread message

Jordan Squire

unread,
Dec 3, 2013, 4:58:34 PM12/3/13
to zvirtualsc...@googlegroups.com
The following javascript no longer functions for me after upgrading to 7.0:

require('.\\scripts\\helper.js')
var h = new helper();
var noaa = h.getPlugin("NOAA");
log(noaa.isDark());

It appears that the NOAA plugin is not retrieved and hence noaa.isDark() returns an error. Any suggestions?

Paul Craven

unread,
Dec 6, 2013, 6:14:19 PM12/6/13
to zvirtualsc...@googlegroups.com
I was using this as well.  Can anyone help?

Jordan Squire

unread,
Dec 17, 2013, 2:01:30 PM12/17/13
to zvirtualsc...@googlegroups.com
Someone? Anyone!? ECHO...echo...echo...

Rob Chartier

unread,
Dec 19, 2013, 2:16:40 PM12/19/13
to zvirtualsc...@googlegroups.com
Looks like a pretty easy problem to solve, the plugin name was changed.  This works:

require('.\\scripts\\helper.js')
var h = new helper();
var noaa = h.getPlugin("NOAA Plug-in for ZVS");
log(noaa.isDark());


notice the call to h.getPlugin()

instead of just "NOAA", change it to: "NOAA Plug-in for ZVS"

Cheers,

-Rob




On Tuesday, December 17, 2013 11:01:30 AM UTC-8, Jordan Squire wrote:
Someone? Anyone!? ECHO...echo...echo...

Jordan Squire

unread,
Dec 19, 2013, 3:00:59 PM12/19/13
to zvirtualsc...@googlegroups.com
Rob, thanks for your help! However, the code modification you suggest does not work for me. I still get an error upon calling noaa.isDark(). The error I receive is:
"Finished with errors. Function expected", so it appears that the plugin is still not loaded. I am on zVirtualScenes version 7.0.949.

- Jordan

Rob Chartier

unread,
Dec 19, 2013, 3:08:08 PM12/19/13
to zvirtualsc...@googlegroups.com

Funny..it was disabled on my machine, and it still executed without errors.

 

Now that it is enabled, it still executes without error..this is from source though.  I will download 949 and try it..

--
You received this message because you are subscribed to the Google Groups "zVirtualScenes Forums" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zvirtualscenes-f...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Rob Chartier

unread,
Dec 19, 2013, 3:16:57 PM12/19/13
to zvirtualsc...@googlegroups.com

 

Definitely working for me here..for build 949.

 

Make sure that you do have the scripts:

 

C:\Program Files\zVirtualScenes\scripts\

 

And that helper.js is in that folder.

 

It looks like it is *not* installed by default with the MSI installer.

Paul Craven

unread,
Dec 20, 2013, 1:38:24 PM12/20/13
to zvirtualsc...@googlegroups.com
Thanks for the help Rob.  Can you paste in your helper.js?  I had noticed the scripts folder was not installed with 7.0.0.949.  I just added the directory and the helper.js file.

I made the small change but I can't seem to get it working.  I've tried on 2 PCs.

Rob Chartier

unread,
Dec 20, 2013, 5:40:26 PM12/20/13
to zvirtualsc...@googlegroups.com
I used the one from the HEAD/TRUNK, found here:



Also make sure the plugin is enabled.

Also, try this..


var noaa = h.getPlugin("NOAA Plug-in for ZVS");
log(noaa);


What does that output?

Paul Craven

unread,
Dec 20, 2013, 6:10:02 PM12/20/13
to zvirtualsc...@googlegroups.com
I have the plugin enabled.

log(noaa);

outputs:
"NOAAPlugin.NOAAPlugin" without quotes in the log.

Jordan Squire

unread,
Dec 20, 2013, 7:10:22 PM12/20/13
to zvirtualsc...@googlegroups.com
Updating to the newest helper.js worked for me. Thanks Rob!

Paul Craven

unread,
Dec 20, 2013, 7:16:39 PM12/20/13
to zvirtualsc...@googlegroups.com
Ha!  Got it working here too!  Tried again on my other PC starting from scratch with new scripts and it's working.

Thanks for the help, Rob!

Robert Dobbs

unread,
Sep 5, 2014, 7:56:42 AM9/5/14
to zvirtualsc...@googlegroups.com
Just for the reference of future dummies, like myself, be careful how you "copy-n-paste" the files from the source tree into the scripts directory.  I kept getting this error due to a bunch of strange "?"s in the pasted source code which I could not see until I loaded it up into Notepad++ .   On the source tree in your browser, Show details -> View raw file...
Reply all
Reply to author
Forward
0 new messages