Guido in JS broken?

edited June 2014 in JavaScript Mode

I installed the guido library in order to do some GUI work in Javscript mode. The examples won't run in JS mode, however. Though from my understanding, they should be able to.

The sketches fail to run, and the error I get in the console is "Uncaught Processing.js: Unable to execute pjs sketch: ReferenceError: Interactive is not defined". Seems like the library isn't being loaded properly.

Any fixes? Am I doing something wrong? Did a Processing/PJS update break guido? Any advice appreciated. If this should be under the 'library' category, apologies ahead of time.

Any other decent PJS compatible GUI libraries?

Answers

  • Guido library works in my Processing 2.0.2 both in Java & JavaScript modes! 3:-O

  • I'm running Processing 2.2.1, and have tried in Chrome and Firefox.

    I've tried running in 2.0.3 as well, and its the same. Not sure if installing the newer version might have changed it somehow. I haven't tried 2.0.2, yet. Is it better to be using 2.0.2 (or other older builds) for reasons like these? I don't think I'm doing anything that spectacular that would require 2.2.1, but I just kept it up to date out of habit.

  • Not sure if installing the newer version might have changed it somehow.

    What ya mean by newer version? Latest "processing.js" file? I'm using v1.4.1 yet! ~:>

  • I got this to work by adding a "Guido.js" tab in my processing sketch, and pasting the contents of Guido.js into it.

    I would like something more convenient in terms of getting the correct import statements to work. Doing the tab/paste thing hinders the workflow if you are going from Java to JS and back again.

    GoToLoop- what do your import statements look like? "import de.bezier.guido.*;"? Are you pre-loading for js mode? what does that line look like for you?

  • edited July 2014

    Guido library comes w/ examples:

    • In "Java Mode", hit CTRL+SHIFT+O in order to open it!
    • Search for Contributed Libraries -> Guido. And choose any of its examples.
    • Change to "JavaScript Mode" & click Play to start server.
    • After that, hit CTRL+K in order to open the sketch's folder.
    • You'll find a "/web-export" subfolder there.
    • And inside that, another subfolder called "/libs" w/ a file called "Guido.js".
    • I believe that the generated "index.html" file automatically includes scripts from the "/libs" subfolder!
  • Hmmmm. Doing that results in the original error. Even in the Guido examples and across multiple browsers. Does it work for you?

  • Yes it works alright to me! Have you checked whether processing.js is still the old stable v1.4.1??? :-/

Sign In or Register to comment.