Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 47
Registered: ‎09-11-2009
My Device: Not Specified
Accepted Solution

Dialog Box

hi All

i want to alert user that your task has been completed with Dialog.ask method but i am getting error that i cant execute dialog without any event so is there  way to execute Dialog box.

Highlighted
Developer
Posts: 183
Registered: ‎12-17-2008
My Device: 8320

Re: Dialog Box

try this!

 

int type=Dialog.ask(Dialog.D_YES_NO,"Please confirm");
       

if(type==Dialog.YES)
{

 // perform your task if yes 

}

else

 // perform your task if no

kums

******************************

Press kudos which the post help you
Please mark posts as solved if you got a solution
Developer
Posts: 133
Registered: ‎07-20-2009
My Device: Not Specified

Re: Dialog Box

try this, if you just need alert

 

                  UiApplication.getUiApplication().invokeLater(new Runnable(){

                    public void run(){

                      Dialog.alert(" I am a message..............................");

                    }

                  }); 

Contributor
Posts: 41
Registered: ‎01-27-2011
My Device: Not Specified

Re: Dialog Box

I tried this code and it worked great for me as well.

 

Thanks!

Contributor
Posts: 12
Registered: ‎06-09-2011
My Device: Blackberry 7290
My Carrier: Vodafone

Re: Dialog Box

This worked for me perfectly...

Thanks a ton!!