Skip to main content

Re: Motorola gui update with thread

1 reply [Last post]
Anonymous

Hi,

Take a look at Display.callSerially(Runnable r).

Best,

Alexander Zyil

Mobile Dept Manager

Tel: 375 17 293 3736 (ext. 438)

www.scnsoft.com

ICQ: 165233933

MSN zyl.alexander@hotmail.com

Skype: alexander.zyl

E-mail: zyl@scnsoft.com

Web: www.scnsoft.com

________________________________

From: A mailing list for KVM discussion
[mailto:KVM-INTEREST@JAVA.SUN.COM] On Behalf Of Chris B
Sent: Thursday, January 25, 2007 1:07 AM
To: KVM-INTEREST@JAVA.SUN.COM
Subject: Motorola gui update with thread

I'm having problems getting my Motorola C975 to switch to a canvas when
another task is running. For example :

public void run(){

vc = new ACanvas(this); //implements runnable
new Thread(vc).start();

//then in ACanvas class call
Display.getDisplay(midlet).setCurrent(this);

//do stuff in current class

}

The problem is that setCurrent is only working when the current class
has finished and blocks until then. It's the same story with things like
Gauges on Forms that are created in a different thread. They don't show
until the parent class has finished whatever it's doing. There's no such
problems on other phones I've tried.

Can anyone help?

========================================================================
=== To unsubscribe, send email to listserv@java.sun.com and include in
the body of the message "signoff KVM-INTEREST". For general help, send
email to listserv@java.sun.com and include in the body of the message
"help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Chris B

I've done the callSerially and it does work and updates the canvas - but only towards the end of the running task? Like when it's about 90%
----- Original Message -----
From: Zyl, Alexander
To: KVM-INTEREST@JAVA.SUN.COM
Sent: Thursday, January 25, 2007 8:44 AM
Subject: Re: Motorola gui update with thread

Hi,

Take a look at Display.callSerially(Runnable r).

Best,

Alexander Zyil

Mobile Dept Manager

Tel: 375 17 293 3736 (ext. 438)

www.scnsoft.com

ICQ: 165233933

MSN zyl.alexander@hotmail.com

Skype: alexander.zyl

E-mail: zyl@scnsoft.com

Web: www.scnsoft.com

------------------------------------------------------------------------------

From: A mailing list for KVM discussion [mailto:KVM-INTEREST@JAVA.SUN.COM] On Behalf Of Chris B
Sent: Thursday, January 25, 2007 1:07 AM
To: KVM-INTEREST@JAVA.SUN.COM
Subject: Motorola gui update with thread

I'm having problems getting my Motorola C975 to switch to a canvas when another task is running. For example :

public void run(){

vc = new ACanvas(this); //implements runnable
new Thread(vc).start();

//then in ACanvas class call Display.getDisplay(midlet).setCurrent(this);

//do stuff in current class

}

The problem is that setCurrent is only working when the current class has finished and blocks until then. It's the same story with things like Gauges on Forms that are created in a different thread. They don't show until the parent class has finished whatever it's doing. There's no such problems on other phones I've tried.

Can anyone help?

=========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff KVM-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help". =========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff KVM-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]