fjenett / javascript-mode-processing

Former ProcessingJS mode (Processing 1.5) that became JavaScript mode (Processing 2.0 beta) that has now been moved out of the Processing IDE.
57 stars 13 forks source link

0.3.3 NOT Compatible with Processing 3.0 #35

Open chengjun opened 9 years ago

chengjun commented 9 years ago

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

0.3.3 not compatible
fjenett commented 9 years ago

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.

chengjun commented 9 years ago

@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 commented 9 years ago

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

fjenett commented 9 years ago

Great, thanks for reporting.

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

fjenett commented 9 years ago

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

q2dg commented 8 years ago

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

chepecarlos commented 8 years ago

Gracias @fjenett funciona en Processing 3.0.1 en Linux Mint 17.03

mpbraendle commented 8 years ago

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.

russellcameronthomas commented 8 years ago

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.

GoToLoop commented 8 years ago

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

woltau commented 8 years ago

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.

q2dg commented 8 years ago

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

russellcameronthomas commented 8 years ago

@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.

woltau commented 8 years ago

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.

GoToLoop commented 8 years ago

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

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

woltau commented 8 years ago

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

pjm56 commented 7 years ago

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 :)

skbpillai commented 7 years ago

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.

wraithious commented 7 years ago

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

wraithious commented 7 years ago

@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

Spadinuh commented 4 years ago

@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 commented 4 years ago

How come 4 years later javascript is still not working

GoToLoop commented 4 years ago

@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

zingus commented 4 years ago

@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.

danieltibaquira commented 3 years ago

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.