Null Pointer Exception
prtysh opened this issue · comments
Getting error whenever trying to run any example code provided for in Joshua's site- for HCanvas.
HYPE.pde:1:0:1:0: NullPointerException
When trying to run in Processing it says:
Syntax error on(s) misplaced construct(s) - Tab=build, Line=2
Error on "}" - Tab=HYPE, Line= 2
Is this issue known?
yes this is a known error... as this is something that has broken with the newest release of P6beta... and... has been fixed in our "library" branch... which we're working on as we speak.
I see, been dying over here trying to get the canvas working, because who likes the fade in the normal stage.
And it is weird seeing your video in one tab - and getting your reply in another :)
It was raised already, my bad.
I am still not able to get it to work.
Unzipped everything from the Library version, and pasted to the /Processing/libraries, so the dir structure looks as mentioned in installation instructions.
[01:42 @ Pratyush ../HYPE ]$ pwd
/Users/Pratyush/Documents/Processing/libraries/HYPE
[01:42 @ Pratyush ../HYPE ]$ ls
CHANGELOG.md README.md distribution/ library/ reference/ src/
LICENSE.txt data/ examples/ library.properties resources/
howdy - so you are catching us right at the exact moment we're rocking new things... so let me help...
- https://github.com/hype/HYPE_Processing/tree/library download zip
- unzip HYPE_Processing-library.zip
- navigate to "distribution"
- unzip HYPE.zip
- move HYPE folder to /Documents/Processing/libraries
until I package up all the new examples... create a test sketch with the following
import hype.*;
HCanvas canvas;
HRect rect;
void setup() {
size(640,640);
H.init(this).background(#242424);
canvas = new HCanvas().autoClear(false).fade(5);
H.add(canvas);
canvas.add( rect = new HRect(50).rounding(5) ).noStroke().fill(#FF3300).rotate(45);
}
void draw() {
rect.loc( (int)random(width), (int)random(height));
H.drawStage();
}
literally yesterday and today - I've been migrate the new examples with this new structure. Hopefully will have everything buttoned up by tomorrow.
awesome !
lemme try this too, in that case.
Been spending quite a few sleepless nights.
nope earlier I had done these exact steps.
That does not work- only changing the lines seems to do this for now.
just to be clear... you're not using HYPE.pde anymore.
ah no, but I am.
Following your skillshare session... So I guess, this is something above the HYPE.pde and is aimed at replacing the need to hold the pde file in the build dir.
:)
my classes are coded against Processing 2.2.1 - knowing were moving into Processing 3 beta
we knew some stuff was going to break... so either you have to use HYPE.pde with processing 2.2.1 - or move into using Processing 3 beta but with HYPE as a proper Processing library HYPE.jar... in which case HYPE.pde wont be used. but you'll have to add import at the top of your sketch (like most Processing Libraries work)
why ?
well since Processing is moving away from ProcessingJS - there is no need to keep rocking HYPE as a HYPE.pde setup.
:)
Ah I see.
I have not used processing before the class,
Let me read up some and then hopefully move to Processing 3 with the jar library.
Thanks for the help !! :D
Never mind,
I understood how the import statement works. Able to load the libraries. I had done correct steps- but did not know that I had to add import statement, given I was using HYPE.pde. I feel less complicated now :)
10x thanks.