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

not working with pre-release Processing 3.0a11 #33

Closed liquidzym closed 9 years ago

liquidzym commented 9 years ago

needs rebuild to working with current version which is 3.0a11 cheers

GoToLoop commented 9 years ago

Processing's Java mode is in the middle of major restructuring. That's why it's in alpha stage now! We should w8 till it gets a stable release before wasting time creating temporary compatibility releases! I've got v3.0a5 w/ both JS & CS modes working perfectly btW! :D

fjenett commented 9 years ago

Ok, thanks for reporting

mpbraendle commented 9 years ago

Also not working with 3.0b2. See https://github.com/processing/processing/wiki/Changes-in-3.0 for changes in Modes.

fjenett commented 9 years ago

OK, tx

dcuartielles commented 9 years ago

also not working for 3b05 when installing from the management tool

chrisallick commented 9 years ago

quickly adding not working with 3.0b7 thanks

mpbraendle commented 9 years ago

Processing 3 is now out. Would be nice to have JS mode working.

fjenett commented 9 years ago

Pinging me won't help … i am very aware of the Processing releases.

With the fundamental changes to the PDE in 3.0 the JS mode is currently too broken to speed-fix. So there are two ways to handle this: wait for me to find more time than just an hour somewhen at night or look into the problem and send me a pull request … :)

fjenett commented 9 years ago

Ok, that said i managed to fix most of the problems … if you have a minute please test this version and open new issues for any problems you find:

https://github.com/fjenett/javascript-mode-processing/blob/8204f3ccd7042cac73ee2950b8dfcdc3b4b44bfd/release/JavaScriptMode.zip?raw=true (download, unzip, move to "modes" folder, restart Processing)

GoToLoop commented 9 years ago

It's working for me right now! Just tested this semi cross-mode sketch: :D

/** 
 * No Repeat ID Input (v2.0)
 * by GoToLoop (2015/Sep/15)
 *
 * forum.processing.org/two/discussion/12532/
 * windowjs-cross-mode-alert-confirm-prompt-other-js-api-for-java
 *
 * forum.Processing.org/two/discussion/869/check-array-contents-with-arraylist
 *
 * studio.ProcessingTogether.com/sp/pad/export/ro.9$Bjf6i21oXBw
 */

import java.util.List;
final List<String> ids = new ArrayList<String>();
{
  for (String s : window.Array("alert()", "confirm()", "prompt()"))  ids.add(s);
}

void draw() {
  for (String id : ids)  print(id + " ");
  println(" ");

  final String id = window.prompt("Please enter new ID");

  if (id == null)  exit();
  else if (id.length() == 0)  window.alert("Empty ID Input!!!");
  else if (ids.contains(id))  window.alert("ID \"" + id + "\" exists already!!!");
  else {
    window.alert("ID \"" + id + "\" successfully added!!!");
    ids.add(id);
  }
}
fjenett commented 9 years ago

Great! I will leave it for a couple of days and then clean up and make a release.

GoToLoop commented 9 years ago

Now you just need to do the same for CoffeeScript Mode. Even though not that famous. @_@

fjenett commented 9 years ago

It sits on top of JS mode, so once this baby is out the door the other one should be a quick fix.

mpbraendle commented 9 years ago

It's working great! Just tried a longer sketch. Thank you very much!

liquidzym commented 9 years ago

strange,not working in my case,after unzip it and move it to the modes folder.still can't find JavaScriptMode

GoToLoop commented 9 years ago

Gotta be subfolder "modes/" from our "sketchBook". It's not the 1 from where Processing is installed in. Check the real "sketchBook" location by hitting CTRL + , (comma).

fjenett commented 9 years ago

... and there is a new sketchbook location for Processing 3.

liquidzym commented 9 years ago

ah,sorry about that,totally forget about this

fjenett commented 9 years ago

Ok, no major bug reports so far. Closing this.

Please open a new issue when you find anything.