Note that there are some explanatory texts on larger screens.

plurals
  1. USJAMESSTONEco
    primarykey
    data
    text
    plurals
    1. COI think this is a good solution to the problem. Namely, that you can use `break;' to break a while loop, however, only from a logical standpoint. Meaning, it can do that in one linear progression through your loop. Processing however uses a game style loop as it runs and all interactivity, mouse, buttons clicked, etc. must be calculated and still allow the loop to run. If you want to allow for more complex interaction, in your mousePressed() or mouseReleased() methods just set a global flag (a boolean) and check for it the next time through the loop.
      singulars
    2. COOne thing to think about is whether you will change the size of the array after the constructor. If so you should use an ArrayList if not an array. Alternatively you could pass an int to the constructor and declare `array = new int[_numberOfNodes];` and then set the individual elements of the array later. You could also define a maximum number of nodes and declare the array to that size and use a int to keep track of the number of elements in the array that you are using but I think the ArrayList often provides a simpler solution.
      singulars
    3. COare you using the [mega specific library](http://arduino.cc/playground/uploads/Nilseuropa/processing-arduinomega.zip) from the [Arduino Playground](http://www.arduino.cc/playground/Interfacing/Processing)?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload