We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Eclipse - some error and stff
Page Index Toggle Pages: 1
Eclipse - some error and stff (Read 1468 times)
Eclipse - some error and stff
Apr 7th, 2009, 3:38pm
 
The serializable class does not declare a static final serialVersionUID field

?? uh?

it's a warning, if i write "static final long serialVersionUID = 0;"
warning gets off.. but what's?!?

then. i had my processing stuff in eclipse. compile. work well. yeah.
and to make an .exe file?
not possibile? to lunch it by batch? java MyCompiledClass in path where i have .class?
and for fullscreen?
Re: Eclipse - some error and stff
Reply #1 - Apr 7th, 2009, 3:48pm
 
another big problem (that in my opinion should be resolved in references!)

i'm using eclipse
and for question of code readeability i write import for all classes (normally i use AS3 and i am used to do this.) so, now, for simple test, i've only have "import processing.core.PApplet;"

but now i don't have basic type color. what i have to import?

Re: Eclipse - some error and stff
Reply #2 - Apr 8th, 2009, 1:40am
 
We have a lot of warnings like that at work, in our large, old code base...

Classes can implement the Serializable interface (and lot of Swing classes do, at least all JComponents), indicating they can be serialized (saved to disk, streamed over network, etc.).

To avoid compatibility issues (saving a class with an old version, loading it with a modified class, with fields added or removed), you are supposed to add an ID: if the loaded data has an ID different of the current one, Java will protest.
You can put a dummy serialVersionUID like you did, a simple one (1, 10,152...) or an automatically generated one (-5768984524246542298L). If you don't provide such ID, Java will generate one based on the current code, so it will change on each minor update, even if it doesn't affect serialization.
If you have no intent to serialize data (frequent with Swing components), just add @SuppressWarnings("serial") annotation, both removing the warning and documenting your intent.
For more information than you need on serialization, you can read Canadian Mind Products' page on Serialization.  Wink

And you cannot have the color "type" in Eclipse: it is actually dynamically replaced with a simple int by the Processing pre-processor (which also make literal decimal numbers being floats and some other adjustments simplifying Java syntax).
Re: Eclipse - some error and stff
Reply #3 - Apr 8th, 2009, 2:48am
 
thanks a lot
i'll use a dumb serializable id because i don't know anythink about serializable interface neither about swing.
i hope only it doesn't related with threads goes on multi core intel computer, because in this case i'll have to face it : )

and i'll use int and not color.
thanks : D
Re: Eclipse - some error and stff
Reply #4 - Apr 12th, 2009, 8:36am
 
ok
i have problem with fill.
for example fill(0x707070)

i think it's kind of problem about type. 0x707070 it's an hexadecimal notation, int my_colro maybe is wrong.

how can i do?

and how can i find list of all pre-processor adjustments that processing enviromet do?
Re: Eclipse - some error and stff
Reply #5 - Apr 13th, 2009, 3:41am
 
You don't tell us what problem you have with fill.
I guess you don't see the color.
In Java, it must be fill(0xFF707070) to set the alpha to opaque. Or use color() calls.
Page Index Toggle Pages: 1