Dialog.ask () do not work?

Hi all

I called Dialog.ask (Dialog.D_YES_NO, "text") in class A that extern class Thread.

I debuged and he ran on this line but the dialog box occur and my program is suspended.

but Dialog.ask (Dialog.D_YES_NO, "text") work well when she called in the class screen extern class.

No matter what suggesstion, thank you!

I think that you must synchronize the lock of the event when calling Dialog.ask

public class A extends Thread{
    public void run(){
        ...
        synchronized(UiApplication.getEventLock()){
             Dialog.ask(...);
        }
        ...
    }

}

Tags: BlackBerry Developers

Similar Questions

  • Open Directory dialog box does not work in FM 10 if client API is not built with 10 FDK

    Hello

    We have a FrameMaker API client that we have maintained for more than 10 years, since before the FM 6.

    We just brought the code of FDK 7 to 9 FDK so that we can finally move 7 FM support and focus on FM 9 and 10 features. Almost all the code works fine, but we have problems in a function that uses F_ApiChooseFile in FV_ChooseOpenDir mode.

    We do nothing special in the code (I am aware that by passing a value into directory argument can cause the function returns without displaying the dialog box) and you use F_ApiChooseFile in its simplest form:

    IntT err;

    StringT stemp;

    ERR = F_ApiChooseFile (& stemp, (StringT) "Select the folder containing the files to be processed.", (StringT) "", (StringT) "", FV_ChooseOpenDir, (StringT) "");

    When we create our DLL using FDK 9 client and run it in FM 9, the directory chooser dialog box appears correctly and the user can select a directory.

    When the same DLL is running in FM 10, the dialog box does not appear and the function returns immediately with err =-1 and FA_errno no error reported (as if the user has clicked Cancel).

    If I recompile the DLL using FDK 10 dialog work in FM 10, so the problem seems to certainly be related to backward compatibility with a DLL built with an earlier version of FDK.

    Unfortunately, you cannot run a DLL of FDK in FM 9 10 and we do not want to distribute and maintain two different versions of our DLL to support 9 FM and FM 10 users.

    Is there a solution to this?

    This bug was introduced in FM10. Until FM9, FV_ChooseOpenDir was #defined as "3", while in FM10, it was changed to '4' (as part of the evolution of these sets to focus on the value of flag-based). What customers can do to overcome this, is to get the FM using 'FP_VersionMajor' version, and for versions before FM10, they can pass 3 'in FM10, as an argument, the argument will be 4'.

    We will ensure that we will honor the 3 and 4 as "FV_ChooseOpenDir" in the future, but until then, workaround above should work.

    Kind regards

    Rene beauclair

  • AutoPlay dialog box does not work; flashes upwards and disappears

    AutoPlay stopped working on my PC. First thing I noticed when I swapped a game disc (FEAR: Extraction Point), who had been in the car for a few weeks, for another (Gears Of War). No AutoPlay dialog box does appear. I opened and closed it again, AFRAID to put in, tried an audio CD. No luck.

    What is interesting, is that if I pay attention, AutoPlay Windows flashes up, but immediately disappears. The same thing happens if I 'force' autoplay via the context menu in Explorer.

    I tried the following:

    (1) obviously checked the auto run settings in the control panel. Reset by default, activated it and left, etc.

    ' (2) ' the core hardware detection ' is running and set to automatic. Checked through "services.msc".

    (3) applied a few registry tweaks for entries "NoDriveAutorun" and "NoTypeAutorun".

    None of the above have made the difference. I am running Windows 7 Home Premium 64.

    Please help! Thanks in advance.

    This same situation has begun to occurring with my x 64 installation Win 7 Ultimate and I tried to fix it for ten days.

    Something changed 14 10 days ago and I can't remember what it was. Too many days had passed for restoration help, because it does not restore earlier I had.

    I tried everthing tried dancingcarb. Even downloaded 'autoplay repair' and ' defaul Programs editor ", ran and still no joy. I searched the web and read a lot of posts, but nothing did. This post is one that describes more precisely what I saw.

    Settings for AutoPlay in Control Panel type of work. PowerDVD will launch when I insert a recorded DVD, Windows Media player launches when I insert a CD recorded and Explorer will launch when I insert a data disc. But, always selecting "ask" does nothing. I don't remember Autorun recently. I see the reading dialog box automatic box flash on the screen. I can click the drive and select autoplay, but the same thing happens - the dialog box flashes and disappears.

    I tried to uninstall CyberLink Suite and Nero. Nothing has changed. I wonder if a recent update of Windows changed how works the AutoPlay.

    I ran a full system virus scan.

    This is a new computer about a month old and I'm bored to choose what I want to do every time.

    It's like something (a manager of some sort maybe) Hung all non-application specific selections. If I had Win 7 secondary machine, I start this topic and then to compare registry settings between the two.

    I have not tried booting in SafeMode (will try tonight), but I don't have much hope.

    It is the last obstacle to overcome (and don't understand why it's happening). I hate the idea of starting fresh and redo what I spent the last month making (which involved about methodically mobile 1.5 TB of data and install apps from my last computer), not even know if it will solve the problem. I would be grateful if someone can point us in the right direction. I'm out of ideas.

    Thank you.

    Later...

    Regarding the "check if auto execution works in safe mode." No, it isn't. Best I can tell, it is not yet available.

    As dancingcrab, sfc found nothing.

    Still stuck

    +*+*+*+*

    I don't know what just happened, but I lost my summary of the steps to solve the problem on my system troubleshooting. I can tell if it helps someone, but for now -.

    MotoHelper Service has proved to be the culprit on my system. Changed the service for a manual start and Autoplay now works as expected.

    I hope this helps.

  • The Option "do not open legs until I asked" does not work

    In the previous version, this feature worked perfectly but now, every time I open Firefox all tabs are load. I would like to know how I can solve this problem.

  • HP Deskjet D5560 Printing Preferences dialog box does not work in Windows 8


    Welcome to the HP Forums 1mf,

    I see by your post that you have all the options in the printer preferences and it's in a different language.

    Thanks for providing the screenshots. I can help you with this problem.

    Check the settings of language on the computer first.

    Go to start, control panel and double-click regional settings, and then replace the language here

    English of the United States.
  • "Send your request" / "Ask in person" does not work

    Since yesterday, the possibility to request the allocation of sites using Windows Live Family Safety has not worked for me. When you try to access a page, standard "this page is blocked" page, as well as buttons for "Send your request" and "ask in person. However, nothing happens when you press one of these keys.  This has been fully functional for a while now, and I made no changes to my computer or all parameters in the days following the resulting problem. This is particularly problematic because I meet this guest near-constantly, caused by the automatic blocking of the parental control of pages in a blocked area.  (For example, if I want to block only the homepage of www.something.com, but want to access www.something.com/anotherthing, I have to manually turn it on each page. The way in which certain function of forums, even taking into account the Subforums forces me to unlock every message that I do, because the URL for the subforum will be www.something.com/anotherthing while the posts will be www.something.com/individualthread1234567. If there is a way around this problem and blocking only the home page, I would be very grateful to hear, as it has been a thorn in my side for a while).

    It seems that the problem has been corrected.

    I can't say for sure, but this is fixed because of a new update - http://support.microsoft.com/kb/3025390 ("some web application modal dialog boxes do not work correctly in Internet Explorer 11 after you install the update of 3008923") because it's the only one update since I reported the problem, and he noted a similar problem.

    The only thing is that this hotfix corrects a hotfix that was released 11 dec.  We have had this problem since October/November, so this correction can just inadvertently be fixing the issue of the safety of the family.  Microsoft has still not acknowledged the problem reported in this post.  In addition, the page of the application still does not seem to load completely - the upper pane is always truncated.  But at least the buttons work now and in person window opens and works, and e-mail is also sent if this option is selected.

  • Call Dialog.ask in the Thread Run method

    "in I want to call Dialog.alert and using following code but its exception to throw the wire.

    "Exception occurs java.lang.RuntimeException: pushModalScreen called by a thread of non-event."

    synchronized (Application.getEventLock ())

    {

    if (Dialog.ask ("catalog is obsolete. You want to keep it? ", choices, select, select [0])(==1)"

    {

    Run the required functionality

    }

    }

    pls help me

    I keep saying this, so forgive me of repeating myself, but:

    synchronized (Application.getEventLock ()) {}

    should only be used when nothing else will work for you or you make a very simple, very fast UI update.

    A Dialog.ask is not very fast!

    In this case, you have several options, but the most obvious solution is to ask the question before starting the Thread.  So, if that is your treatment

    Thread catUpdateThread = new Thread() {}

    public void run() {}

    Dialog.ask (...)

    Other treatments

    }

    }

    catUpdateThread.start ();

    What should do the same and works OK. :

    UiApplication.getUiApplication.invokelater (new Runnable() {}

    public void run() {}

    Dialog.ask (...)

    If (result == Yes) {}

    Thread catUpdateThread =...;

    catUpdateThread... Start();

    }

    }

    });

  • Previous button doesn't work is not in dialog.ask

    Hello

    If dialog.ask with 2-3 buttons is displayed on clickin device key return her without closing the dialog box, but dialog.alert is closed

    How to close the dialog box?

    Use constructor [] [] and the values of the choices and add values to activate the BACK-1 button.

  • paid for the subscription, but Muse CC does not work, he asks me the serial number

    paid for the subscription, but Muse CC does not work, he asks me the serial number, any help?

    Hello

    Depending on your operating system, please try the following steps

    Windows

    • Click on the start"" menu. Select "All programs" and then "accessories."
    • Right click on "Notepad" and select "run as Administrator"
    • Click "Continue" on the "Windows needs your permission" dialog box
    • When Notepad opens, click file, and then select open
    • In the file name field, type the following text:
    • C:\Windows\System32\Drivers\etc\hosts
    • If all of the entries in the host file include keywords such as "adobe", remove these entries. These are used for the purchase of licenses Adobe.
    • From the menu, select 'file', 'save' after changing
    • Restart the Muse

    Macintosh

    • Click the "Finder". Select the folder "Applications".
    • Open the "Utilities" folder and select "Terminal".
    • Type the following command:
    • sudo nano/etc/hosts
    • Enter the password associated with the user of the OS when prompted
    • If all of the entries in the host file include keywords such as "adobe", remove these entries. These are used for the purchase of licenses Adobe.
    • Press CTRL + o to save the file
    • Press Ctrl + x to close the file
    • Restart the Muse

    Let me know the result

  • Hey I bought iphone 5, 4 years ago. Resetly I update yesterday suddelly asked for activation ID, so I put but did not work. Before I had to change an e-mail and I put in a new. Now demand for old e-mail and what is incorrect.

    Hey I bought iphone 5, 4 years ago. Resetly I update yesterday suddelly asked for activation ID, so I put but did not work. Before I had to change an e-mail and I put in a new. Now demand for old e-mail and what is incorrect. What should I do? I have new Id and worked, but not with my phone.

    I live in Slovakia and I bought this iphone in Florida USA

    Thank you, Maria Nagy

    Any ideas?

  • Siri does not work. It can respond to me when I say hello or ask a definition or calculation, but nothing like that to open applications or play some things from Apple's music.

    Hello. I have an iPhone on iOS 9.2 and siri 6 did not work. I can do things as said in the title, but could not open all the apps or do something with apple's music. The message that I get when asking to 'Open the Messages app' is 'you can't see an application called 'messages'. We could see if the app store has it. "For music from Apple, when I ask 'Play my mixed songs', it says"Sorry, I'm unable to play your music." Before you answer, it takes a while to load, if that helps somehow. If someone knows how to fix this or help, please comment. Thank you.

    I also have similar problems. I bought my iPhone 6 s more in January, and the software is up-to-date. Siri seems to understand me very well, but can't seem to perform the tasks. I get messages like: "it does not appear that you have an app called music", "uh oh there's a problem you can try again? ',"Sorry, I can't play your music"and many more responses means having a hard time to do anything. I tried to reset my settings and at this point, I'm about to wipe the phone and try again see if that makes a difference. It's been less than a month I've had this phone... I'm tempted to send it back.

  • A person of so-called security from Microsoft called and said my firewall did not work and had an ID # and asked me to do certain things is - this legitimate?

    A person supposed to be Microsoft called and said my Firewall Security Center was not working and had an ID # they said was my ID of computers that he read out to me and that I have no idea whether or not this is the ID.  They wanted me to be in front of my computer and asked me to do things and wouldn't continue until I started, I started to do what they asked which of course I did NOT! I requested a call back number, and that's what he gave me:
    1 855-731-4936 and his name was Fred Watson, was not American speaking, very strong foreign accent.
    Is - is this legitimate?

    Its a scam.  A well known and long-lasting.  Microsoft will never ask you for personal information (they already have them) and you never call cold.  Nor do they send messages of anti virus - and they do not have to connect to your machine.  NEVER allow anyone to connect remotely to your machine.

    They are the partners who do this nor Microsoft does not only

    See below for additional information on this topic and what to do and how Microsoft works:

    http://www.Microsoft.com/security/online-privacy/msName.aspx
    http://www.Microsoft.com/security/online-privacy/phishing-scams.aspx

  • HP pavilion G6S68U laptop: bluescreen ask pw Admin but pw does not work

    Hi, Ive got the blue screen asking the admin pw but the pw that I setup does not work. I received a number of disabled system 81002496.
    Any help would be much appreciated.
    Thank you!

    Try the meat.

    34960418

    Use this code to go into the BIOS.

    Disable all passwords that are enabled.

    If demand for CURRENT password using this code.

    Request NEW password just press ENTER.

    If asked to hit just to CHECK password to enter.

    Save and exit.

    REO

    I must inform you that these services are not endorsed by HP, and that HP is not responsible for any damages that may occur to your system using these services. Please be aware that you do so at your own risk.

  • Windows Defender dialog box indicates it does not work.

    Problem with windows defender

    I use windows vista, my problem is with windows defender, it does not work well, even, it does not start when I click on icon (icon is correctly linked) displaying a dialog box to turn on the Defender, but that does not work.     After that restart Defender opens in a seprate window but after a few minutes (1-2 min) it turns off automatically

    Windows Defender cannot be used with AVG, McAfee, Microsoft Security Essentials (MSE) or Norton and several other similar programs.  It is part of the Vista and Win 7 operating system and cannot be uninstalled.  Maybe your antivirus program is disabled Windows Defender - and maybe it's exactly what it is supposed to do.

    You may want to consider the following: Windows Defender and Microsoft Security Essentials

    If you can not only your problem please post back and elaborate detailed about your computer, program antimalware, etc...

    Kind regards...

  • Computer Vista asks to be reactivated. Product key does not work.

    original title: my activation code does not work

    I have vista on my computer and now he asks me the activation code.  It is the same operating system that is installed with the computer, but the activation code will not work.  Help please.

    Hello

    If there were problems in office, read this;

    ·                         TRAIL of Activation of office

    ·                         you would have a preinstalled trail version of office installed

    There are only so many days use or use of the times with a version of office to test

    I'm sorry but the Office comes for free with a windows operating system

    You must purchase separately the Office

    and the product key on your computer/laptop is for the windows operating system not the office suite of applications

    link below is to the store of microsft office versions and prices

    http://store.Microsoft.com/Microsoft/Office/category/2

    You may also be interested to read everything and downloaded the free free office suite of applications office at the link below

    http://www.OpenOffice.org/

Maybe you are looking for

  • How to restore a photo library using iCloud on a MacBook?

    I now use iCloud for back up my entire library (more than 200 GB).  How to restore a photo library (including all data of pictures like faces, events, etc.) on my MacBook Pro when my MacBook Pro needs to be replaced? I used historically Time Machine

  • Satellite A210-15J - no sound after waking from sleep in Vista mode

    Satellite A210-15J, RAM 2x2gb, BIOS v1.70, Vista Ultimate x 64 SP1 (with all hotfixes), driver audio Realtek v.2.01. After the Windows Vista recovery, high-definition audio (HDA) device is not working properly. There is no sound, only noise.

  • Problems with iTunes sync - Equium A200-1v0

    Hello wonder if someone could help with this? I have trouble to synchronize my Toshiba Equium A200-1v0 with my iphone in itunes.The laptop worked well with an ipod for years are, however, have no joy with the iphone. Someone suggested that my drivers

  • Satellite A60 - USB 2.0 TVBox does not work

    I connect a model USB TVbox PV-TV414U made by Prolink Pixelview for my Satellite A60, I install all the drivers and all the updates for this computer and when I run the program to watch TV from the computer with a BugCode_Usb_Error message blue scree

  • Backlight HP become darker after you apply windows updates

    Hi there I have a problem with my pavilion dv6200 This is the third time the same thing is happening to me. After I install some updates, display DIMM, and background light became darker. When I restart the computer and enter the BIOS, or if I am loo