The following issue was in a document by nokia on its forum site, (document's name: Developer Platform 2.0: Known Issues)
Problem# 2.15.4 Display.setCurrent(Alert alert, Displayable nextDisplayable) method
Description: The method public void setCurrent(Alert alert, Displayable nextDisplayable) requests an Alert to be shown; after the Alert is dismissed, nextDisplayable is shown. Currently, this works incorrectly. The title of nextDisplayable is shown on the screen, but otherwise the display contents are not updated. After this, no display changes are possible.
Solution: First, set the Displayable A, then set the Alert B (by using the setCurrent() method). Then add the CommandListener to the Alert. When the Alert is dismissed, you get the event. You can then change the Displayable in the Listener. Another option is to use thread and its Sleep() method and the Displayable.setCurrent() method to change the displayable, when the Alert is dismissed. This issue has been corrected in software version 4.09.1.
I had this problem, and I solved it a follows in terms of code:
//the code that displays the alert
private void displayAlert(Alert alert, String message,Form NewForm)
{
alert.setString(message);
alert.setCommandListener(this);
if(NewForm!=null)
{
AlertForm = NewForm;
display.setCurrent(alert);
}
}
//the code that displays the form after the alert is dismissed
public void alertCommandAction(Command c, Displayable d)
{
if(c==((Alert)d).DISMISS_COMMAND)
display.setCurrent(AlertForm);
}
However the problem stated above remained the same, only the title of the New Form appeared.....it didn't appeared in total.....I wanted to know if I implemented the solution correctly in terms of java code.....any help on this??

Reply With Quote


