javascript-mode-processing icon indicating copy to clipboard operation
javascript-mode-processing copied to clipboard

0.3.3 NOT Compatible with Processing 3.0

Open chengjun opened this issue 10 years ago • 25 comments

Hi, the tool of JavaScript Mode is awesome. However, it's not compatible with processing 3.0. Any suggestion?

0.3.3 not compatible

chengjun avatar Oct 16 '15 04:10 chengjun

This is actually a duplicate of #33 … the recent build here will work in Processing 3.0, please test: https://raw.githubusercontent.com/fjenett/javascript-mode-processing/8204f3ccd7042cac73ee2950b8dfcdc3b4b44bfd/release/JavaScriptMode.zip

A proper release for 3.0 is going out once if had enough feedback on the test build.

fjenett avatar Oct 16 '15 08:10 fjenett

@fjenett Thanks. that's really a good news. I am currently using the p5 editor instead. p5 editor is also one of my favorites.

chengjun avatar Oct 20 '15 09:10 chengjun

@fjenett I downloaded the zipped file above, and put it in the document/processing/modes folder, now I can use the javascript mode!

chengjun avatar Oct 20 '15 10:10 chengjun

Great, thanks for reporting.

Please note that processing.js and p5.js are very different. JavaScript mode uses processing.js …

fjenett avatar Oct 20 '15 13:10 fjenett

I'll leave this open until the new release is out ...

fjenett avatar Oct 23 '15 06:10 fjenett

Ei, version of Processing.js sought by Processing 3.0.1 IDE still is 0.3.3

q2dg avatar Jan 03 '16 00:01 q2dg

Gracias @fjenett funciona en Processing 3.0.1 en Linux Mint 17.03

chepecarlos avatar Jan 17 '16 19:01 chepecarlos

In Processing 3.2.1, if one turns on the JavaScript mode (v0.4.0 as given by the zip file above in this issue), the File > New menu is not working anymore. You can still open a sketch using File > Open In Processing 3.1.2, the File > New menu runs fine in JavaScript mode.

mpbraendle avatar Sep 08 '16 05:09 mpbraendle

I can confirm that JavaScript mode (v0.4.0) doesn't work in Processing 3.2.1. When I create a new sketch and then select Mode > Javascript, the sketch IDE window disappears.

russellcameronthomas avatar Oct 15 '16 06:10 russellcameronthomas

I'm still using version 3.1.2 and it works very well here! :triumph:

GoToLoop avatar Oct 15 '16 07:10 GoToLoop

Is there any hope to get the JavaScriptMode (v 0.4.0) getting fixed to work with Processing 3.2.1 ? In the last semester I worked with 3.1.2 in an introductory programming course quite well and now our computer department installed 3.2.1 and I can confirm russelcameronthomas observations: the IDE window disappears and you have to kill manually the javaw process.

woltau avatar Oct 20 '16 10:10 woltau

I know it's not the same, but you could try with this other tool: https://github.com/fathominfo/processing-p5js-mode

q2dg avatar Oct 20 '16 13:10 q2dg

@q2dg Yeah, P5JS the direction I'm going to go. I assume this means I can't use the libraries written for Processing, but I'll live with that I guess.

russellcameronthomas avatar Nov 02 '16 04:11 russellcameronthomas

Since Processing 3.1.2 (i.e. 3.2.1 - 3.2.3) there are the following problems in windows if you have JavaScriptMode (v.0.4.0) installed: 1) File->New causes 'Error while assigning the template' (in JavaScriptMode) 2) If the last mode used was JavaScriptMode (i.e. you closed the last windows while being in JavaScriptMode) then if you start Processing directly the Splash-Screen appears and then nothing more happens. You have to kill the javaw process. But you can start Processing via activating a .pde-file - then everything works fine.

woltau avatar Nov 08 '16 13:11 woltau

Since Processing 3.1.2 (i.e. 3.2.1 - 3.2.3)

By "Since" you've meant "After", right? :P

GoToLoop avatar Nov 08 '16 14:11 GoToLoop

Yes, it is of course after 3.1.2 (sorry for my english, I am a german).

woltau avatar Nov 08 '16 14:11 woltau

Hi folks - I can confirm this is still a problem with 0.4.0 and Processing 3.3.3. The 'Error while assigning the template' comes from line 263 in processing.app.Mode -- it is all to do with not being able to find a file called "sketch.pde" in the mode template folder. Looks like they have changed the way that templating works (blame: benfry, commit aa214287e33ffec29ee47bb5c518cee8301861b7).

Here is the workaround:

Inside your documents/processing3/modes/JavaScriptMode/template folder, create (another) new folder called template and move processing.js and template.html into it. One level above, create a blank file called sketch.pde

It's ugly but it works -- @fjenett I assume that you need to make changes to the JavaScriptMode so that it looks for everything in the right place, before the modes folder structure can be beautified. I do wish people wouldn't break the most useful parts of Processing quite so often :)

pjm56 avatar May 17 '17 17:05 pjm56

Hi, I tried unzipping the JavaScriptMode into the correct path and started Processing. Drop-down shows JavaScript Mode, but the moment I select it, the application vanishes! Ideally, it is supposed to close Java mode and reopen in JavaScript Mode, but instead, it never opens up back again. The only way to make it work again is to restart the laptop.

skbpillai avatar Jul 22 '17 15:07 skbpillai

thanks @fjenett that does work! However it only seems to work with sketches without imports such as PeasyCam for example.

wraithious avatar Jul 30 '17 01:07 wraithious

@fjenett Hi, one problem I encountered with your mode is after closing all processing windows with javascript mode enabled I am unable to open processing via the processing.exe. (loading screen appears for an extended time then disappears without starting the program, further attempts cause the loading screen to appear for 1 second then disappear without loading the program) I could however click on a project.pde file and that starts processing normally, so to test I switched to java mode, closed processing and then re opened it via the processing.exe and it loaded fine.

Note: I'm using processing 3.3.5

wraithious avatar Jul 30 '17 16:07 wraithious

@fjenett Hello, I uploaded your unzipped file into the sketchbook and it's still not working on the windows. Did I miss a step?

Spadinuh avatar Dec 15 '19 00:12 Spadinuh

How come 4 years later javascript is still not working

Spadinuh avatar Dec 15 '19 00:12 Spadinuh

@Spadinuh, we can deploy ".pde" files on the web using a very simple "index.html" template file: https://Bl.ocks.org/GoToLoop/a5db257be4d7756a00220a3e97066dd5 https://GitHub.com/GoSubRoutine/Grumbo

GoToLoop avatar Dec 15 '19 00:12 GoToLoop

@fjenett Hi, one problem I encountered with your mode is after closing all processing windows with javascript mode enabled I am unable to open processing via the processing.exe. (loading screen appears for an extended time then disappears without starting the program, further attempts cause the loading screen to appear for 1 second then disappear without loading the program) I could however click on a project.pde file and that starts processing normally, so to test I switched to java mode, closed processing and then re opened it via the processing.exe and it loaded fine.

Note: I'm using processing 3.3.5

I experienced the same but I managed to find it's because of an error while trying to open a new document.

image

If after installing and selecting the javascript mode you start processing by clicking on a .pde, it still starts. But then if then you try to open a new document with File->New it returns this error.

zingus avatar Jan 23 '20 01:01 zingus

Hi folks - I can confirm this is still a problem with 0.4.0 and Processing 3.3.3. The 'Error while assigning the template' comes from line 263 in processing.app.Mode -- it is all to do with not being able to find a file called "sketch.pde" in the mode template folder. Looks like they have changed the way that templating works (blame: benfry, commit aa214287e33ffec29ee47bb5c518cee8301861b7).

Here is the workaround:

Inside your documents/processing3/modes/JavaScriptMode/template folder, create (another) new folder called template and move processing.js and template.html into it. One level above, create a blank file called sketch.pde

It's ugly but it works -- @fjenett I assume that you need to make changes to the JavaScriptMode so that it looks for everything in the right place, before the modes folder structure can be beautified. I do wish people wouldn't break the most useful parts of Processing quite so often :)

If anyone still has this problem, I found a solution inspired on the response @pjm56 gave (thanks!). Thanks to the project structure Processing now uses you should:

  1. Go to the $HOME/sketchbook/modes/JavaScripMode/template folder
  2. There's no need to create another template folder, just create a 'sketch' folder
  3. Create a sketch.pde file inside the 'sketch' folder

Voilà, use this file to open Processing in Javascript mode.

danieltibaquira avatar May 14 '21 18:05 danieltibaquira