I have a midlet class (called ClassesTestMIDlet) and two other classes (Calcs and MoreCalcs).
I would like to know if it possible for the methods in Calcs and MoreCalcs to access variables from the ClassesTestMIDlet class without having to declare the ClassesTestMIDlet variables static, and without having to pass the current instance of ClassesTestMIDlet when constructing the other classes.
Here is the code....
.... which gives the following compile error: ClassesTest/MoreCalcs.java [14:26] non-static variable testInt cannot be referenced from a static context ClassesTestMIDlet.testInt = p; 1 error Errors compiling MoreCalcs.
So was just wondering if anyone knows whether it's possible?
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads