somewhat confused. Can't find mention of hashtable in documentation (hashmap, yes -- though not in Javadoc index) but on the other hand see it used as a data type in some sample code.
The following code exhibits a behavior that doesn't make sense to me... perhaps someone can explain or perhaps a bug?
(running 1.5 in Windows 7.)
What I call "version 1" works OK. (you can select any .pde or .txt file when prompted and it runs fine.)
If I comment out "version 1" and uncomment "version 2" the pgm doesn't compile -- the mapData array isn't recognized.
So it would appear that within the "else" part of the if statement the mapData array is recognized but outside of it it isn't???
// version 1
void setup() {
String loadPath = selectInput("choose any .txt or .pde file"); // Opens file chooser
if (loadPath == null) {
println("No file was selected...");
} else {
String[] mapData = loadStrings(loadPath) ;
println("There are " + mapData.length + " lines") ; // this is how to get length of array
println("first line is " + mapData[0]) ;
} // in this version print statements are within else path
println("!! pgm exit !!!") ;
}
// end of version 1
// version 2
// void setup() {
// String loadPath = selectInput("choose map data file"); // Opens file chooser
// if (loadPath == null) {
// println("No file was selected...");
//} else {
// String[] mapData = loadStrings(loadPath) ;
//} // in this version following 2 statements are out of else path
// println("There are " + mapData.length + " lines") ; // this is how to get length of array
// println("first line is " + mapData[0]) ;
// println("!! pgm exit !!!") ;
// }
// end of version 2
I'm struggling with how the pixel array behaves as a function of image operations. In the JavaDoc entry for PImage a mention is made:
"Code for copying, resizing, scaling, and blending contributed by
toxi."
Can someone point me to where this code is? -- I don't recognize it as part of the "examples".
I was interested in programming my Android phone so I've gotten 2.0a3 downloaded and running. So far, so good. Except, I'd also like to be creating some 3D applets and the export doesn't work yet. I'm only 1 week into Processing, so there's alot I don't know about how things work out. Should I install 1.5 if I want to export applets or should I assume this problem will be solved before too long? Is there a problem installing both releases at the same time on the same machine?
Is there a simple way to maintain the screen position of text output for sketches where the graphic content is dynamic (through rotations, transforms, use of camera, etc.). Is this what textMode(SCREEN) [RIP] used to do?
Just started and believe have successfully installed. Can get example sketches to run OK as standard and also on Android phone. However, cannot get emulator to boot. "ouch, emulator got killed, I think" etc. Have latest Android SDK, Java, Processing downloads. Some sort of path problem? or missed some plug-in? I'm on a Win32 platform. Have seen earlier postings with similar problem but not convinced prior solutions are applicable.