(RequestHandler classes are no problem, so that is not my issue)
I went back to a very simple code (to test) and it also fails.
I have created a helloExtension class which is loaded in Smartfox as mainClass.
Then I have a second helloWorld class in the same jar file.
(so one compiled jar file blaExtension with two classes, helloExtension and helloWorld)
Calling the first method test1 works without problem, but when I call the test2, I get java.lang.NullPointerException.
I cannot figure out why this is happening.
It looks like when using plain java code, there is no problem, but when I go use some Smartfox stuff in the second class, it fails.
My test code:
my extension class looks like this:
Code: Select all
public class helloExtension extends SFSExtension {
HelloWorld bla = new HelloWorld();
trace(bla.test1());
bla.test2();
}
Then the second class helloWorld:
Code: Select all
class HelloWorld extends BaseClientRequestHandler {
public String test1(){
return("test1");
}
public void test2(){
trace("test2");
}
}
What can I do to use separate classes or is it impossible to call other methods from the mainClass ?