|
Re: Should I do initialing work in midlet constructor?: msg#00209java.sun.kvm
Xu Feng wrote: > From Learning wireless Java by Qusay H.Mabmoud, I learned that I should never > call Display.getDisplay() in midlet constructors, because that may cause > errors by application manager. > But the startApp() method may be called many times, and that would consume > much time if initialing work is done in the startApp() method. > > So, how should I do? For example, you could perform the time consuming tasks only if startApp was called for the first time... Display display; public void startApp() { if (display == null) { // not initialized? display = Display.getDisplay(); // further one-time initialization steps.. } // show midlet as requested } Cheers, Stefan --- http://www.kobjects.org =========================================================================== To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body of the message "signoff KVM-INTEREST". For general help, send email to listserv@xxxxxxxxxxxx and include in the body of the message "help".
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: WMA 1.1, Gary Adams - SMI Software Development |
|---|---|
| Next by Date: | Re: Should I do initialing work in midlet constructor?, Kim Daniel Arthur |
| Previous by Thread: | Should I do initialing work in midlet constructor?, Xu Feng |
| Next by Thread: | Re: Should I do initialing work in midlet constructor?, Kim Daniel Arthur |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |