I have a few quick problems that I'm hoping you can help with:
Using J2ME w/NetBeans.
I want to divide my program into multiple classes in different files. So I make a class for the File Browser part of my program but without "extends MIDlet" on it. I can invoke it from the main class and everything is fine, except for 3 things:
1. I am waiting for the user to select a file in the File Browser. The only way I can figure out how to do this is to get the main thread to sleep every 200ms and then check if they have selected a file:
Surely there is a better way to do it?
2. I can't call notifyDestroyed() from the FileBrowser class, so I have to use a variable to communicate back to the main class. This works fine (it happens in the waitforfile() function below), except that at one point of the program I am in an infinite loop that I thought would be broken if notifyDestroyed() is called. Apparently if it's in this infinite loop it won't exit at all.
3. When I start up the program on the emulator it gives me two choices of MIDlet, main and FileBrowser. Main is the only valid one and the only one I want to launch. Will this happen when I deploy it on the phone?
path = waitForFile();