02-07-2013 01:09 AM
Hi all,
Earlier today I was able to get a program running and I was actually relatively happy with it despite it having a lot of bugs. However, in attempts to remove the bugs and me being foolish and forgetting to back up my previous code it no longer works. Anyway the line of code I used was
UiApplication.getUiApplication().pushScreen(ScanSc
ScanScreen being a method that I created in another class.
Any help is greatly appreciated thanks!
Solved! Go to Solution.
02-07-2013 03:02 AM
Did you debugged the code..
Check if any null pointer exceptions occurs or check with display stack for which screen is currently displayed.
02-07-2013 07:44 AM
send an instance of the main app to the other class
eg OtherClass oc = new OtherClass(this);
From the other class >>
private MyApp _app;
public OtherClass(MyApp app){
_app = app;
}
now from the metod >>
public void method(){
_app.invokeLater(new Runnable() {
public void run() {
MyApp.CallMethod();
}
});
}
02-07-2013 01:09 PM
Thanks for all the help! I just made a new button and pushed the event from there. It is working for now so thanks again for all the help everyone!