Need help Dialog.Ask

Hello

How can I get the value of the button clicked the dialog.ask that I tried with the following code, but it is retruning-1.

Here is the code I tried

result int = Dialog.ask (Dialog.D_YES_NO, "you do not have an open account, you want to create a?");    . Can someone help me with the code snippet.

Thank you

Sujithravindran

follow these steps:

Dialog d = new Dialog(Dialog.D_YES_NO,
                        "You don't have an Account open, would you like to create one?",
                        1,
                        null,
                        Manager.USE_ALL_WIDTH);
                int i = d.doModal();

                if (i == Dialog .YES)
                {
                    //do something positive ehre
                }
                else
                {
                       //do something ehre
                }

Tags: BlackBerry Developers

Similar Questions

  • I have a problem, try to uninstall the ask toolbar. get the error message: cannot access the VB script... need help please

    I have a problem, try to uninstall the ask toolbar. get the error message: unable to access the VB script... need help

    Hello

    How do you try to uninstall the toolbar?

    I would suggest trying the following methods and check if it helps.

    Method 1:

    Try the steps in the following Microsoft article and check if it helps.

    How to fix script errors in Internet Explorer on Windows computers:

    http://support.Microsoft.com/kb/308260

    Correction of errors in Internet Explorer: http://support.microsoft.com/kb/822521

    Method 2:

    Try to uninstall the toolbar, programs and features and check if it helps.

    Uninstall or change a program:

    http://Windows.Microsoft.com/en-us/Windows-Vista/uninstall-or-change-a-program

    Hope the information is useful.

  • Need help with custom dialog box

    I created a custom help dialog box. The problem is that 5 buttons do not properly fit in my manager of horizontal field on some blackberry devices. How can I make own? I tried to use my own custom buttons that allow me to specify their width and height, but I'm unable to get the width of the dialog box, so I can't determine how wide should be buttons.

    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    
    public class HelpDialog extends Dialog
    {
        static int ButtonPressed;
        HorizontalFieldManager hfmChoices = new HorizontalFieldManager();
        ButtonField cmdFirst = new ButtonField("|<")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 0;
                close();
                return true;
            }
        };
        ButtonField cmdPrev = new ButtonField("<")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 1;
                close();
                return true;
            }
        };
        ButtonField cmdNext = new ButtonField(">")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 2;
                close();
                return true;
            }
        };
        ButtonField cmdLast = new ButtonField(">|")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 3;
                close();
                return true;
            }
        };
        ButtonField cmdClose = new ButtonField("Close")
        {
            protected boolean navigationClick(int status, int time)
            {
                close();
                return true;
            }
        };
    
        public HelpDialog(String message, int page, int maxPages)
        {
            super("Help (Page: " + page + " of " + maxPages + ")\n\n" + message + "\n", null, null, -1, null, 0);
            ButtonPressed = -1;
            if (page <= 1)
            {
                cmdFirst.setEnabled(false);
                cmdPrev.setEnabled(false);
            }
            if (page >= maxPages)
            {
                cmdNext.setEnabled(false);
                cmdLast.setEnabled(false);
            }
            hfmChoices.add(cmdFirst);
            hfmChoices.add(cmdPrev);
            hfmChoices.add(cmdNext);
            hfmChoices.add(cmdLast);
            hfmChoices.add(cmdClose);
            add(hfmChoices);
        }
    }
    

    Thank you

    Most people have no need a close button, they expect the ESC to do it for them.

    That said, I disagree with this statement:

    "I think that the only good way to use managers other than the AbsoluteFieldManager, is to use them at all."

    Designing a user experience that works well on multiple devices is difficult, and I don't think that has a size fits all approach work.  In addition, I don't have the time to create formats for specific screens for each device type, and although this will not happen now, I didn't have to rework screen designs every time that a new device came out.  I think that it is possible to create a common user interface experience given the size of the screen, and whether it is touch.  If you want to read my thoughts on this, have a look at the tutorial of the user interface you will find here:

    http://supportforums.BlackBerry.com/T5/Java-development/tutorials-for-new-developers-part-1/m-p/1621...

  • Need help ask point

    I need help affecting an element of application. What I have is the salesrep_id1 as part of the request. I'm doing it on the login page, but when I view a logged in session state, I got nothing for this element in the elements of the application. I put it as a process under the page processing.

    Any suggestions? 4.2.5 operating

    BEGIN
       SELECT salesrep_id1
         INTO :SALESREP1
         FROM SALESREPS_TABLE
        WHERE UPPER (user_name) = UPPER (:APP_USER);
    EXCEPTION
       WHEN OTHERS
       THEN
          :SALESREP1:= SQLERRM;
    END;
    

    Thank you

    Joseph

    It belongs to your procedure after authentication , what triggers once the user logs - in order to have a value in APP_USER. It is located in the authentication scheme.

    "On the new instance" will draw the first time you open any page - including the connection.

  • Need help, connect to the wifi and Panel set to work.

    Let me start by saying that I recently downloaded malware bytes and microsoft security essentials. Malware found 4 corrupted files. I deleted the and also received a warning that the files needed to restore. I restarted the computer and then I realized that the computer wouldn't connect to the Internet wirelessly. There is no any wifi connection possible. I tried to access the firewall via the Control Panel, but I received a message saying that something is misspelled, and I needed to check my spelling and try again. I can't access anything in the control panel. I then returned to malicious software and restored the files and I don't know if it restored. Again, I have no wireless connections and cannot use Control Panel. I did a restore there when I knew that nothing was wrong with her, but he says that there is no change for a week about a week ago. I need help!

    What are the 'properties' can you get not to?

    If you were not able to see something like this picture--> http://www.askdavetaylor.com/4-blog-pics/windows-system-properties.jpg

    or you have to this Properties dialog box, but the part of the circle includes all mention of the Service Pack,

    Then, it's probably time for you to go to a good independent store (place of type no BigBoxStoreUSA or geeksquad) computer repair.  If they think they can reinstall Windows, ask them to back up your data (files, photos, music) first.  Ask them to tell you the consequences of reinstalling Windows before they do.

  • Use Dialog.ask to call message (email/sms)

    Hello

    I try to use Dialog.ask to ask the user to send information by e-mail or sms... I use the following code:

    public void ask(){
    
          UiApplication.getUiApplication().invokeLater(new Runnable(){          public void run(){
    
                  Object[] choices = new Object[] {"Email", "SMS",};                int result = Dialog.ask("Send Via:", choices, 1);
    
                   switch (result) {             case 1:               email();              case 2:               sms();                    }};       });   }
    

    When I use the dialog box displayed correctly, however when I choose either by e-mail or sms nothing happens...

    I'm fairly new to java and mobile development so easy on me... I'm sure it's a simple solution.

    I have searched these forums and tried a few different things, cant just make it work the way I need to.

    Incase anyone wants to see these:

    public void email(){      MessageArguments messageArgs = new MessageArguments(MessageArguments.ARG_NEW, "","", messageField.getText());        Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, messageArgs);   }
    
        public void sms(){        MessageArguments messageArgs = new MessageArguments(MessageArguments.ARG_NEW_SMS);        Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES, messageArgs);        
    
        } 
    

    Thank you so much for your support and your help

    Thanks for the suggestion of using the breaks.  I have inserted two breaks and I'm still questions... See code below.  Again, any suggestions are welcome!

    public void ask(){
    
          UiApplication.getUiApplication().invokeLater(new Runnable(){          public void run(){
    
                  Object[] choices = new Object[] {"SMS", "Email"};             int result = Dialog.ask("Send Via:", choices, 1);
    
                   switch (result) {             case 1:                   sms();                    break;                case 2:                   email();                  break;            }};       });   }
    

    In doing so, the top option, SMS, still does not.  The button at the bottom, email, will work as it should

  • photos were deleted from my phone? !!! need help urgent pls

    So I'll start from the beginning.

    So at the beginning I had 5200 pictures and everything was fine, except that I couldn't take any pictures on Snapchat. So I decided to delete some pictures. Except sometimes just deleted photos would return as 2 seconds. And sometimes I would say 5 photos selected, but I couldn't see anything selected? Or I have to press SELECT again and again.

    at least one forward a few hours and I received on my phone, except that now it says I have only 3600 pictures! I lost a few photos, especially those previously on my phone, then some of the pictures I deleted months ago as last year are back. And I have pictures on my recently removed, but not the ones I lost!

    I feel that my phone is somehow back in time or something.

    And I lost a few photos of a wedding and I regret totally stayed so much (((pls est de toute façon??))

    also, I need help using http://www.ipad-converters.org/recover-photos-from-iphone/ this type also.

    Hello

    When you recharge an iPhone / iPad, it will be saved up to iCloud on wifi you

    Restore the original configuration.

    When configuring back it will ask you if you want to use iCloud backup say yes

    Use the backup of a time where you had all your photos.

    See you soon

    Brian

  • I have a 6 s iphone it stopped charging and it turn on at all, what wrong? I need help...

    I was using my Iphone overnight and he was charging and went up 23% and then when I'm done instead of it loads up to... It came down, and he ended up 1%, let him alone all night to recharge and I woke up and he was dead, I thought that "maybe it could be my cable." I used my other cable and left there for a good 30 minutes nothing so when I went with a friend, I asked, that I can use here he charger I left it loads and nothing, it's been 2 days since this happened and my phone will not charge or turn on... I need help, I even tried the method to hold the home button for 10 seconds and nothing. What's wrong?

    It's may be a problem with the power outlet telephone is plugged, plug it on others and see if the problem is persistent.

  • I need help I want my iPhone to be unlocked my iphone operator

    I need help I want my iPhone to be unlocked my iphone operator

    version no. 9.2 [13 c 75]

    IPhone 4 16 gb s

    storage capacity: 27.2 GB

    Serial number: C39H5BBLDTD8

    model: MD243J/A

    modem firmware: 6.0.00

    Ask your provider if they open it. Nobody else can.

    (142217)

  • I'm suddenly needing help with my browser Firefox (6.0.2)

    Hello
    I'm suddenly needing help with my browser Firefox (6.0.2)

    (OS: I use Windows XP).

    When I open the browser, I don't see is a totally white screen of white, with all the toolbars at the top.

    I know that my physical connections are very good: I have tested the modem, turned the pc market etc and I can also receive/send emails.

    This problem started today, September 8, 2011 and has never happened before.

    Is it a coincidence that Firefox itself to day before I disconnected yesterday evening? Could this be something to do with this particular new update?

    I also noticed that just before I "opened" Firefox, I now get a small box indicating:

    [JAVASCRIPT APPLICATION]
    Handl exc in Ev: TypeError: this oRoot.enable is not a function

    This never appeared before - I hope that it offers a clue has what is wrong.

    The browser not be stuck in Mode safe, said by the way.

    Of course, I can't find solutions to the problem on the internet, I don't physically see all Web sites!
    (A friend sends this request in my name from their pc)

    Any light you can throw on this problem of confusion would be much appreciated. I'd rather not have to uninstall and reinstall Firefox if possible.

    If the only option is to uninstall Firefox and reinstall from your site, I'm also in trouble (I can not see the internet or download).
    In this case, would you be able to send the .exe file as an attachment to my e-mail address? In the affirmative, please let me know and I'll give you more details.

    Thanks in advance.

    One possible cause is security software (firewall) that blocks or limits Firefox or plugin-container process without informing you, possibly after the detection of changes (update) for the Firefox program.

    Delete all rules for Firefox in the list of permissions in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.

    See:

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Tecra R840 - need help for installing the SSD

    Hello

    Sorry, again, but I really need help with that?
    My new ssd (arriving in a few days) is a Plextor M5P which is 7 mm thick! My Tecra R840-16J have a thickness 9.5 mm HDD and what I've seen is no caddy!
    I would be grateful all the tricks for installing the ssd drive in my Tecra!

    Thanks for your time,

    Paulo

    Hello Paulo

    As far as I know that some models are available with drive HARD and some with SSD these models with SSD have small SSD support. SSD is fixed by 4 screws in this medium.

    I put t really know how to help you now. Maybe you should contact the nearest Toshiba service provider and ask for help. I think they can check the part number of this door - or maybe order one for you.

  • Re: Need help with the installation of Windows XP Home on my Equium A120-17I

    I really need help here, I need to know with certainty whether someone has already managed to install Windows XP on their laptop Equium A120-17i?

    For now my all new laptop is useless with a new copy of XP is not working due to driver problems.

    I need drivers for all but impossible to find the right everywhere-

    Pilots to operate wireless
    Drivers for sound.
    Drivers for graphics (Radeon X 1200)
    and there are 3 points to mark more yellow in the Device Manager I have no idea what they are!

    I know this has been asked before but someone at - he managed to install again and can point me in the right direction?

    Thank you, Dan!

    Can you please check laptop model name again. Please send the number of model also. Something is wrong with the name displayed for laptop.

  • Need help with the decision of the laptop

    I'm sorry for the length of this post, but I really need help. I am buying a laptop and what should be a very exciting perspective (my first laptop purchase) turns into a nightmare that had me pretty much in tears over the weekend.

    My budget is not big - absolute maximum of 600 pounds, but I'd rather spend a little less than that.

    I mainly work of office (Word, Excel, database and PowerPoint) and also some Photoshop work. I also play a strategy game called Caesar 3. I want to charge my copy of XP on the computer or replace Vista or as a partition.

    Looking through the available templates in my price range and rising benchmarks, I found the following:

    Most have processors such as the Intel T5250 or T5450 or AMD TL 58, which are all rated as ok, but not very well. Some have the AMD TL 60, which is a little better and one or two have the T7200 Intel which is even better.

    On most of the machines graphics cards are the ATI Radeon Xpress X 1200 or the Intel GMA X 3100. These two are calibrated as not terrible and the review says that they cannot manage strategy games. Some of the models have the ATI Mobility Radeon HD 2400 and HD 2400XT and one or two have the HD 2600.

    The problem is that the models that have the best processor have the lower rated graphics card and those who do not have XP drivers, I see.

    Don't mind a 15.4 screen "(although the 17.1" would be very nice to have) and want a pretty big hard drive (160 +). I get 2 GB of RAM.

    I'm at my wits end. I don't want to buy a computer that will eventually take a minute or more to refresh a screen when you have more than two things open, or you will have to keep rebooting to make it work. I want to be able to play my one and only (Caesar III) game which is a strategy game and I want to be able to work in Photoshop and maybe one or two other things open at the same time, as a website perhaps.

    Help me please, anyone. I asking the impossible? I can't get my hands on an email address for Toshiba try to get clarity on their part on the issue of drivers and they will be available in the future.

    Then there is of course the issue detailing as each stock only a limited number of models, and we must choose between those detailing.

    I hope someone can help me!

    Hello

    The problem is you want to buy a laptop all over the place but don t want to spend a lot of money.

    In addition, you want to change the XP operating system and have XP drivers.

    Well it's boyfriend very difficult decision ;)

    A laptop for gaming with the graphics power full card cost slightly more than £ 600
    If you need to make a decision; You want to buy a gaming laptop and to spend more than £ 600 or you will have a notebook that is ideal for everyday use, like watching DVDs, in collaboration with the office software, etc.

    The Caesar game is unknown to me, but I assume that it doesn t need a graphics card high performance and it should work on a normal phone too.

    I think that a Satellite a200 is not bad choice for you, because some A200 laptop computers were shipped with the Intel Pentium Dual-Core processor and an NVIDIA GeForce graphics card.

    And very important is that all the XP drivers were already released ;)

  • Dear community, I need help to change my email and rescue security question

    I need help to change my email of relief. First of all, I don't remember my Security Question. Second, when I click the reset security question and no email has been send to my email of relief. That's why I need help with these two questions

    Unless the email in a spam filter, you have to ask Apple to reset your security questions. To do this, click here and choose a method; If this page does not list one for your country or if you are unable to call, complete and submit this form.

    (137729)

  • 'Use the cartridges SETUP' error on the printer, need help!

    I bought the printer last year in the months of August and after 6 months of use, it started having problems printing wireless. I always had to use USB to print from my laptop so I was recommended by people in this forum to reset my printer to the factory.

    I have reset several times and nothing worked, so I was advised to do so by using the Cancel button and the middle button that reset the printer. Now the problem is it says "Cartridges use SETUP" and my printer is out of warranty, it expired last month. I'm really confused about what to do. I am a student and I still have the print job and I can't afford a new printer. Calling support has no idea what to do and email support does not because of my warranty as you exhale.

    My printer is a HP Deskjet printer Wireless 3070. Product number is CQ191B.

    I really need help has begun the new year of college and I have a lot of missions to print.

    Hi ExPLOiT786

    Dragon-fur asked me to chime in with this. I will send you a private message on this in order to proceed.

    Ciara

Maybe you are looking for