Skip to main content

Animation stopping after menu dialog shown

2 replies [Last post]
pompeybob44uk
Offline
Joined: 2008-07-17
Points: 0

Hi guys,

In the LWUIT demo application I notice that when I'm in the 'animation' demo page and select the 'Help' command in the menubar, the second animation will stop animating when the dialog is cleared.

Perhaps related somehow, I was wondering what the smart way was for receiving notifications when dialogs are disposed of? I have a label working as a ticker that does not resume animating after I cancel the menu bar dialog. Any suggestions would be greatly appreciated.

Cheers,
Bob

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pompeybob44uk
Offline
Joined: 2008-07-17
Points: 0

Thanks, and keep up the good work.

Shai Almog

Hi Bob,
thanks for letting us know. This is a regression in the demo caused
by some bug fixes and changes in LWUIT since it was written.

This is fixed by adding the following in the animation2 object/class:
public void initComponent() {
f.registerAnimated(this);
}

The label ticker not returning to ticking seems to be a LWUIT issue,
I made a fix which seems correct (it might not be) so it should work
in the next version.

Essentially what is happening is this:
init/deinit are invoked when a form is shown/hidden respectively.
A menu is technically a dialog so the form is hidden (deinitialized)
and then shown (initialized again) but the ticker isn't restored
which is the bug.

Thanks.

> Hi guys,
>
> In the LWUIT demo application I notice that when I'm in the
> 'animation' demo page and select the 'Help' command in the menubar,
> the second animation will stop animating when the dialog is cleared.
>
> Perhaps related somehow, I was wondering what the smart way was for
> receiving notifications when dialogs are disposed of? I have a
> label working as a ticker that does not resume animating after I
> cancel the menu bar dialog. Any suggestions would be greatly
> appreciated.
>
> Cheers,
> Bob
> [Message sent by forum member 'pompeybob44uk' (pompeybob44uk)]
>
> http://forums.java.net/jive/thread.jspa?messageID=290436
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]