NullPointerException on showForm...

16 views
Skip to first unread message

premi.de...@gmail.com

unread,
Jan 24, 2014, 8:01:21 AM1/24/14
to codenameone...@googlegroups.com
I have all the UI created in the GUI Builder, but I have an object called activity with holds a StateMachine object. I use this object to get the labels textfields and stuff from the UI, but I can´t call showForm... I get NullPointer.


Here is part of my Main code

public void init(Object context) {}

public void start() {
if(current != null){
current.show();
return;
}

activity = new StateMachine("/theme"){

@Override
protected void beforeSPLASH(Form f) {
Log.p("Splash");
new Splash(activity,f,false);

}


On splash I have

public Splash(StateMachine actividad, Form formulario, boolean botonAtras) {
super(actividad, formulario, botonAtras);

}


       //ON CREATE METHOD
@Override
public void Creado() {
Depurar("Splash");

new UITimer(new Runnable() {
public void run() {
Display.getInstance().callSerially(new Runnable() {
                                   public void run() {
                                     actividad.showForm("TIP", null);
                       
                                 }
                });
}
}).schedule(2500, false, this.actual);


}


Shai Almog

unread,
Jan 24, 2014, 1:35:10 PM1/24/14
to codenameone...@googlegroups.com, premi.de...@gmail.com
Use the original lifecycle class created in the project.
Reply all
Reply to author
Forward
0 new messages