Skip to main content

How to know that menu transition has done?

3 replies [Last post]
ashish_onmobile
Offline
Joined: 2009-05-28

I want to delete all commands from Menu if user select particular command.

But when I do like this screen fluctuate for a second and display form and one exception occur this time.

An exception occurred during transition paint this might be valid in case of a resize in the middle of a transition
java.lang.NullPointerException
at com.sun.lwuit.List.renderComponent(+1)

I think If I am able to catch that animation for Menu transition has done, then I can delete commands and It should not give this error.

Am I correct?

or Is there any other way also?

Regards
Ashish

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07

Are you using the LWUIT EDT correctly to invoke removeAllCommands()?

ashish_onmobile
Offline
Joined: 2009-05-28

Thanks for your reply vprise.

I am doing like this. But I dont know how to do it proper with EDT.

[code]

public void actionPerformed(ActionEvent event)
{
if(evt.getCommand() == cmdRemove)
{
//removeAllCommands();

//or

removeCommand(command1) ;
removeCommand(command2) ;
removeCommand(cmdRemove) ;

}

}

[/code]

vprise
Offline
Joined: 2003-11-07

Your code seems reasonable (callbacks in LWUIT are on the EDT). If you have concise code to reproduce the issue on current SVN please file a bug in the issue tracker.