Problem with 2.1.1 32bit

edited March 2014 in Hello Processing

I have downloaded Processing 2.1.1 32bit on Windows 7. As a newbe I have been following the"Hello Processing" tutorials. When I recreate the code in Processing and try to RUN it all I get is a small window with a colored background! Any suggestions?

Answers

  • Post the code from a simple example that demonstrates the problem. Might help others help you.

  • edited March 2014

    Hi I think I have discovered the problem. I was following that tutorial http://hourofcode.com/pr Unfortunately the code that is displayed appears miss out the need for a size function to make this work. The lecturer talks about "canvas" but does not state a size. This is the code supplied in the tutorial

    background(10, 80, 100);
    
    stroke(255, 255, 255);
    fill(160, 220, 90);
    ellipse(250, 200, 300, 300);
    
    fill(160, 210, 230);
    rect(245, 40, 10, 240);
    
    fill(255, 255, 255);
    ellipse(190, 200, 70, 70)
    

    This is what appears in the display window...

    Processing Display

  • When you want to format code in this forum then highlight it and press Ctrl+k or click on the C button. I have done this for you.

    The problem with your sketch is that the default window size is 100x100 pixels and the shapes are 'off-screen'. Try this

    size(440, 440);
    
    background(10, 80, 100);
    stroke(255, 255, 255);
    fill(160, 220, 90);
    ellipse(250, 200, 300, 300);
    
    fill(160, 210, 230);
    rect(245, 40, 10, 240);
    
    fill(255, 255, 255);
    ellipse(190, 200, 70, 70);
    
  • I eventually realised that was the problem but my point is the code shown is lifted straight out of the tutorial suggesting that the code that is being shown in the demo need to have the size function included. I assumed the mistake was mine but it is the tutorial that is wrong. You will note that in the image the Maximise icon is greyed out! Very confusing for a complete newbe like myself. I assumed it was my updated version of the software that was causing the problem! Thanks for your comments and suggestions.

  • It could be that the tutorial is quite old and at the time it was written the default window size was larger.

    On such a large project as Processing, supported entirely by volunteers, it is difficult to keep every scrap of information up to date.

  • Thanks for the feedback, I'm making a note that we might need to make it more clear that when you go to Processing you need size(). Thanks!

Sign In or Register to comment.