FAQ
Cover
\
Build
\
Source
\
Bugs
\
Reference
\
Libraries
\
Tools
The bugs database has moved
here
.
Bug 1116 : Can't use classes defined in separate tab
Last modified: 2009-01-09 12:12
P
roject:
processing
trash
Version:
unspecified
Co
m
ponent:
android
book
core
libraries
pde
reference
tools
web
Status:
RESOLVED
Resolution:
WONTFIX -
Pr
i
ority:
P2
Severity:
normal
Platform
All
O
S:
All
Windows
Mac OS
Linux
Other
Reporter:
Tom Blackwell
Assigned To:
fry
Attachment
Type
Created
Size
Actions
Description
: Opened: 2009-01-09 08:55
My pde seems to have got itself into a state where it can only use classes
defined in the 'primary' tab; by which I mean the tab with the sketch's name.
example 1:
Primary tab 'BClass' tab
------------ -------------
class Aclass { class Bclass {
} }
Aclass A;
Bclass B;
When I hit the 'run' button I get 'Cannot find a class or type named "Bclass" '
But...
Example 2:
Primary tab 'BClass' tab
------------ -------------
class Aclass { class Bclass {
} }
class Bclass {
}
Aclass A;
Bclass B;
Clicking 'run' produces "Duplicate nested type Bclass"
A little more investigation reveals that I have only one multi-tab sketch
that works properly. This was the sketch I was primarily working on when I
first experienced this problem in a second pde instance. For clarity,
everything worked fine previously.
The problem has survived reboot.
Additional Comment
#1 From Tom Blackwell 2009-01-09 09:29
Sorry, I got too clever with formatting and produced something that is hard
to read. Let me clarify my examples and resubmit.
My pde seems to have got itself into a state where it can only use classes
defined in the 'primary' tab; by which I mean the tab with the sketch's name.
example 1:
Primary tab
------------
class Aclass {
}
Aclass A;
Bclass B;
'BClass' tab
-------------
class Bclass {
}
When I hit the 'run' button I get 'Cannot find a class or type named "Bclass" '
But...
Example 2:
Primary tab
------------ -
class Aclass {
}
class Bclass {
}
Aclass A;
Bclass B;
'BClass' tab
-------------
class Bclass {
}
Clicking 'run' produces "Duplicate nested type Bclass". Which is
inconsistent with example 1.
A little more investigation reveals that I have only one multi-tab sketch
that works properly. This was the sketch I was primarily working on when I
first experienced this problem in a second pde instance. For clarity,
everything worked fine previously.
The problem has survived reboot.
Additional Comment
#2 From Tom Blackwell 2009-01-09 10:23
I substituted one problem for another when I tried to create a simple test
case. The problem with my example can be fixed with with void draw() {}.
Sorry for the red herring.
The only other clue I can offer is that while I was having my problem, task
manager showed a java.exe process persisting after all the pde windows were
closed. However, everything seems to be working fine following the reboot.
I've tried repeating my actions but I am unable to replicate the problem.
Additional Comment
#3 From fry 2009-01-09 12:12
Add a draw() or setup() method. And keep separate classes in the other
tabs, or at the minimum, put setup/draw before your new classes. Otherwise
you're confusing the preprocessor into thinking that you're defining your
own PApplet class.