setup-bug
              in 
             Programming Questions 
              •  
              3 years ago    
            
 
           
             I wonder as there is no bug reporting forum? I assume that is an issue of the processSing core development? (Feel fre to shift my posting to the fitting forum.) 
            
            
I found a severe bug with setup() and mousePressed()/keyPressed(). If you start the following code with setup() activated, mousePressed()/keyPressed().does not work! Without setup() it works perfectly, but only in a default window. I think this is a bug, as it makes it impossible to use a window beside the default.
            
Removing (or commenting) setup() enables this functions. In a first attempt I thought that the mouse click or keyboard buttons will not be registrated. But the print of the coordinates makes clear, that the problem lies elsewhere.
            
I only tried it with different Linux blends. Maybe in Windows that does not happen? (Please check it, I do not use any Windows.)
            
I would apreciate any help!
            
            
 
            
           I found a severe bug with setup() and mousePressed()/keyPressed(). If you start the following code with setup() activated, mousePressed()/keyPressed().does not work! Without setup() it works perfectly, but only in a default window. I think this is a bug, as it makes it impossible to use a window beside the default.
Removing (or commenting) setup() enables this functions. In a first attempt I thought that the mouse click or keyboard buttons will not be registrated. But the print of the coordinates makes clear, that the problem lies elsewhere.
I only tried it with different Linux blends. Maybe in Windows that does not happen? (Please check it, I do not use any Windows.)
I would apreciate any help!
- /*void setup() {
 size(200,200);
 }*/
 void draw() {
 //background(millis());
 }
 void mousePressed() {
 int s = millis()/1000;
 if(mouseX != 0) {
 println("Nach " + s + " Sekunden "+ "X:Y = " + mouseX + ":" + mouseY);
 }
 stroke(0);
 fill(175);
 rectMode(CENTER);
 rect(mouseX, mouseY,10,10);
 }
 void keyPressed() {
 background(millis()); // colour depens on the time left - just for fun
 }

 
 
           
 
             
 
            