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?
Onion rings are vegetable donuts. Taste this tiny ad: