My sketch needs to read in database keys that are "long" ints (64-bits).
Processing can convert "String" to "int", but seems to have a problem converting "String" to "long". I am hoping this is a small oversight that can be fixed in the next update to Processing.
Here is some code that illustrates the problem:
Code:void setup() {
int x = int("17");
long y = long("27"); // this causes the error message
// workaround
long z = java.lang.Long.parseLong("27"); // this looks so ugly!
}
The compile-time error message is:
Code:Semantic Error: No accessible method with signature "parseLong(java.lang.String)" was found in type "processing.core.PApplet".
The JAVA documentation tells me there is a "parseLong" method available in java.lang.Long, but Processing doesn't seem to know about it, since the error message is referring to java.lang.String. There isn't a "parseInt" in java.lang.String either, but Processing knows how to handle that conversion, ...
It would be great if Processing could be "educated" about "long" for the next update, since many large databases (which we might like to visualize using Processing) have keys that are larger than 32-bit "int"s.
thanks,
djones