java errors 37 and 3707
Hello,
I am a beginner with Java programming within Max.
The program below has only one method and does what expected, that is printing the incoming data in the Max window.
However any number coming into either inlet do also produces error messages like these:
com.cycling74.max.MaxRuntimeException
at com.cycling74.max.MaxObject.bail(MaxObject.java:3707)
at ecran_resistif1.inlet(ecran_resistif1.java:37)
What causes these error messages ?
Thank you in advance.
public void inlet(int i) {
if (getInlet() == 1) {
pos_y = i;
bail("pos_y = "+pos_y);
} else {
pos_x = i;
bail("pos_x = "+pos_x);
}
}
If I replace the bail function with post, there's no more error message.
However the bail method doesn't come from nowhere. It's in the official Java for Max .pdf tutorial (see p. 15)
I believe bail() is to be called in the constructor only, if there is an error condition. post() should be used to print messages to the Max window.