FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 241 : setup() called twice with size(width, height, MODE)
Last modified: 2005-12-08 15:06
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
INVALID -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
rick.giles
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2005-12-08 15:01
Processing 0097
Windows XP SP 2
Java 1.5.0_06
There are two calls to setup() when setup() calls size(width, height,
MODE), and MODE is P2D, P3D or OPENGL. Sample sketch:
void setup() {
println("setup");
size(400, 400, P2D);
}
outputs
setup
setup
Additional Comment
#1 From fry 2005-12-08 15:06
that's by design. if the renderer is changing an exception is thrown so
that setup() doesn't complete because the renderer must be valid before
setup() can be run.
that's also one reason why size() must go first inside setup().