×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    43

    How to exit after showing alertbox?

    I want to exit the program after showing the alert.
    I display the alert and then call notifyDestroyed()

    display.setCurrent(alert);
    notifyDestroyed();
    but the program exit without showing the alert.

    so I wrote in the following way.
    Is there any better way?

    Code:
    alert=new Alert("","**********",null,AlertType.ALARM);
    			display.setCurrent(alert);
    			alert.setTimeout(Alert.FOREVER);
    			cmdExit=new Command("Exit",Command.EXIT,0);
    			alert.addCommand(cmdExit);
    			alert.setCommandListener(this);
    			
    		}
    		
    		else
    			display.setCurrent(mainform);
    			
    		
    
    	}
    
    	public void commandAction(Command c, Displayable d) {
    		notifyDestroyed();
    		
    	}

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to exit after showing alertbox?

    You must either do this, or use a Timer.

    Graham.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    4,105

    Re: How to exit after showing alertbox?

    gracy, does this help?

Similar Threads

  1. Grid icons not showing( Only numbers are showing)
    By Hitangshu in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-03-24, 14:41
  2. Replies: 9
    Last Post: 2007-12-05, 05:36
  3. why my does not exit on N73 when i push exit soft key?
    By byronlilu in forum Mobile Java General
    Replies: 2
    Last Post: 2007-06-28, 21:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×