pushGlobalScreen(), I'm doing something wrong?

Hi all

I got this simple piece of code that I expect to work, but it does not have anything on the screen. I have an application that extends the Application, running in the background.like this

Class BackgroundTask extends Applicaition{

   public static void main(String [] args){
      new BackgroundTask().start();
   }

   public void start(){
      //do initializations
      //create threads
      //do some work and then join threads
   }
}

I need it to show a popupscreen based on an event. problem it does not display anything, it's rather the right emulator stops responding and I have to restart.

It's the simple code that runs in a different Thread:

Class PopUpThread extends Thread{

  public void run(){

      try{
    System.out.println("acquiring gloabl lock");

        synchronized(Application.getEventLock()){
       System.out.println("Global lock acquired");
       UiEngine ui = Ui.getUiEngine();
       Screen screen = new Dialog(Dialog.D_OK, "Look out!!!",Dialog.OK, Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION),  Manager.VERTICAL_SCROLL);
       ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_QUEUE);
       System.out.println("finished putting dialog");
    }
     }catch (Exception e){
    System.out.println(e.getMessage());
     }
  }

}

When I run the present, it executes all the instructions print hoowever successfully, it does not show the popup or the dialog box on the screen at all.

I'm doing something wrong?

Thanks for the help!

Dan

false alert guys!

This is now solved.

The problem was that I didn't know that it was essential to enterEventDispatcher() even in Applications. But now I know.

Thank you

Tags: BlackBerry Developers

Similar Questions

  • I tried to search panel, but I'm doing something wrong. It's like watching my screen through a huge magnifying glass.

    * Original title: display

    How can I shrink everything? My office, Web sites, all all jumped up and huge. I tried to search panel, but I'm doing something wrong. It's like watching my screen thanks to

    a huge magnifying glass.

    Hello

    Change the screen resolution:

    http://Windows.Microsoft.com/en-AU/Windows7/change-your-screen-resolution

    If this does not work:

    Access the site on your computer or the manufacturer of the laptop > drivers download Section > then key in your computer or laptop model number > search your operating system > find two graphics / video, or from the Chipset drivers and download and install.

    If you have purchased and installed your own graphics card > access the graphics card manufacturer's Web site > find, download and install the appropriate drivers for your operating system and graphics card model number.

    Then see if you can change the resolution again.

    See you soon.

  • I like the develop module, but I'm doing something wrong in the library in library, under 'Catalogue, all the photos', all my photos appear showing the stars, cropping, and development. The problem is that these changes are not for the photos on my hard d

    I love the develop module, but I'm doing something wrong in the library

    In the library, under 'Catalogue, all the photographs', all my photos appear showing the stars, cropping, and development. The problem is that these changes are not for the photos on my hard drive. When I re-import them in Lr, the changes are not there. My workflow is to do nothing after development or export them to the original with a new file name destination. Anyway, it is that they get a new file name without change of development when they are imported into Lr.  Please help (PC user)

    And others have explained, Lightroom does not apply the changes to the file. All changes are stored in the catalog, and then applied to the image when it is displayed in Lightroom. If you want a copy of the image with any changes so that you can share with others or send it to a laboratory to print, then you must export a copy of this image by using the export dialog box in Lightroom.

    Features of Lightroom as well by its design. The images that you import are always left in their original condition, unmodified.

  • Why not export HTML with trial version of Muse? I'm doing something wrong?

    I was under the impression that the trial was full featured, but this feature seems to be disabled for me... The 'ok' button is not available, it is grayed out. I can choose a folder, but I can't change the name of the domain or click ok. I need to see my work in a few browsers before I can really evaluate this program.

    I'm doing something wrong? Does anyone have any suggestions or advice?

    Thanks for your comments in advance.

    I seems to have gotten to the bottom of my question. My problem was the inability to stick in my domain name. When I typed in manually, the OK button became available.

    Thank you.

  • Flex forum: had ZERO help here. I'm doing something wrong?

    Please do not take it wrong and please don't insult me on this thread.

    I had NO HELP whatsoever. hundreds of people have read my dilemma no comments yet. It's like I don't exist or my questions are complete shit f *-it hurts me so (OPK - I'm insecure - I'm not a pro - if, sometimes, my questions are STUPID - I am a teacher and I would make anyone feel like a C * just to ask a silly question - this is what move on education in particular.)

    I've been on the forum flash 10 years and everyone was so helpful. I always had answers to everything I asked that I not code full time and I don't work in the industry. However my company requires me to create and maintain an LMS (learnng - e-Learning management system) to more than 1,000 children. I used flash successfully for years with xml + php + mysql db.

    Now things have grown up and I need better server solutions - where Flashbuilder/flashdevelop. I looked at some examples of flex with a remote object + amfphp etc... but everyone looks at the post and ignores me. Research on the web other people have asked the same question without result. There is so little info on what I feel it is a plus.

    What I am doing wrong?

    Sorry for a negative but I need to learn how to use this forum - it is so important.

    First of all, for a teacher I would expect rather more patience and understanding that insults people who might help you is not a great way to conquer them.

    I have indeed responded to one of your questions.

    Your questions are very precise, and the vast majority of flex developers have used your technology environment. As a beginner, it takes a start and beginning with a LMS for hundreds or even thousands of users is not ideal.

    I've built several Flex front ends for multiple users (and even a flash who had hundreds of thousands of registered users) and none of them use the battery of your development.

    I used PHP to measure or in another case, django has been used. In all cases, the interface has been via an XML Exchange.

    Many of us are very busy and don't have the time to direct a newbie of little flex knowledge to implement a complex Flex project.

    A few minutes with google seems to find the results.

    http://corlan.org/2008/10/10/Flex-and-PHP-remoting-with-AMFPHP/

    http://flexperiential.com/2010/05/15/Connecting-to-a-Database-using-AMFPHP-Flex-4-remoteob Ject.

    .. etc.

  • I can't download Firefox on my laptop. I'm doing something wrong?

    I have a Dell laptop that runs Windows 8. I am trying to download your browser but after that it ask me if I give permission for you guys to have access to my computer, I click Yes and it does nothing. Help please. Thank you!

    See if you can download the full installation package.

    http://www.Mozilla.com/en-us/Firefox/all.html

  • I bought DAWN OF WAR II, but it says it is not compatible with "steam", he says to disable compatibility mode, but I'm doing something wrong. Help!

    GAME DOES NOT SEEM COMPATIBLE WITH WINDOWS 7!

    Hi Juanlupe30,

    (1) you get an error message?
    (2) did you the latest changes on the computer?
     
    As DAWN OF WAR II is compatible with Windows 7. You can see in the link given below:
    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/search.aspx?type=software&s=dawn%20OF%20WAR%20II

    I suggest you to uninstall and reinstall Steam and check. If you have any games, back to the top of them first to avoid having to re - download all.
     
    Click Start, type services.msc and make sure that the service is started or the manual value. But if you get an error, the fair value of the services manual and restart your computer

    Also try to unplug the router and connect directly to the internet.

    Thank you, and in what concerns:
    Shalini Surana - Microsoft technical support.
    Visit our Microsoft answers feedback Forumand let us know what you think.

  • When I use the figure and figure legend my images disappear in the view Design of DW. I'm doing something wrong?

    It is a continuation of an attempt to make my art stained glass appear in google image searches.

    I add alt tags and also started, on the advice of Nancy O. (thanks again) and from other sources, to replace my current framed with figure and figcaption html.
    With a bit of fiddling, I figured out how to make this work so that it appears in a browser (Safari) (I'm really not that familiar with html code).  Anyway, I like what I'm saying, but there is none in the design view of Dreamweaver(DW CS3) image in the image area, just the languge imgsource text and alt appears. Nor the caption text appears in design mode.


    Is it just an irreparable between HTML5 and the CS3 Dreamweaver divergence or is there something I can do so that I can still see pictures when you work in the Design or split mode?

    Your image tags are not closed, you miss him > at the end of each . For example, change the following...

    stained glass image of holy family visited by angel in abstract religious style

    TO

    stained glass image of holy family visited by angel in abstract religious style>

  • Mix is notcompatible with my samsung galaxy s tablet... I'm doing something wrong?

    Does anyone know if adobe has a version for my rablet on the way

    Hi jensf1949,

    Now, Photoshop Mix is only mobile for Android devices.

    Sorry about that,

    Melissa

  • I'm doing something wrong? I just renewed my subscription but cannot start Ps at all.

    Hello

    I am almost sure that I m wrong, and the answer should be very simple. My monthly permit expired with my credit card and Photoshop has simply stopped working. I renewed my subscription and already received confirmation from Adobe say. I can't get into my account online, but applications on my beginning of end won´t (Photoshop and creative cloud). I can launch Lightroom, but it tells me that my subscription needs renewal.

    I hope that this is not simply a matter of waiting... Any help is welcome.

    Thank you.

    O

    Check your account indicates the subscriptions that you expect (and that the adobe, used in the next step id is correct) by logging in here and checking the status of your subscription, https://www.adobe.com/account.html

    then, if it's current, disconnect and then back to your client application using the adobe with the link above in cc id: http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

  • Import the data on large patterns dictionary... I'm doing something wrong?

    I understand that when I'm working on a model and you want to add a few new DB objects to my relational model of DB (say a few tables) or compare the changes in my relational model for data dictionary - I need to use the import data.  However, when I have a grand scheme of DB (some of our DBs production have hundreds of thousands of objects), it takes an absolute age.  I want often only import a few things or work on the designated items.  For example, 3 tables with the prefix CUST * or compare a few tables, I changed in my relational model for a target given DB, to generate a specific DDL script target.  But I think I have load the list of DB objects?

    Is there a way to prefilter the items recovered by the import data dictionary? e.g. Select the types of objects to include (in my case TABLES only) in the extraction and a filter name on them (in my case 'CUST')?  I don't want to get the entire schema each time just to compare some things, it is almost unusable because it takes forever!

    Not that the diagram does not have a connection with the database, so if someone changes the database there is no way of knowing without run the import again or to do the sync I described (unless you have a process of change management nice where the developers actually connect database changes).

    You could do a CTRL + A (select all), and then run the synchronization. That you will get a list of all of the objects shown in the diagram from the db.

    To filter this list in the dialog box to compare,

    1. Click the tabular view tab
    2. Select "Modified" in unrolling status
    3. Select 'Table' in the Type menu drop-down

    Then you are back to opening to the bottom of the shaft on these items to see what has changed.

  • QPixmap question, I was wondering if I am doing something wrong here...

    So I basically do this:

    QPixmap pixmap1("app/native/shadow.png");

    And the image is deployed, so I'm a bit puzzled as to why he complains when loading it.  When you try to view it, I get a message that it is a pixmap of null.  The thing I have to do to get it to show?

    Thank you

    I forgot to mention that the test application has the file main.qml for qt Simulator charged, check the main.cpp to run it on your pb...

    See you soon,.

    Jon

  • After that I downloaded the app, there is no open button. I'm doing something wrong? What should I do?

    I'm very frustrated because it took me a long time to download Adobe Creative cloud. Then I downloaded the CC Pro first. The problem is once it was finished downloading (which took forever) it is said that it is up-to-date. There is no button open, and I don't know what to do. Help, please!

    Maybe it's a false error that hides the real problem... a 32-bit computer

    You MUST have a 64-bit computer and operating system... What is your computer?

    -http://windows.microsoft.com/en-AU/windows7/find-out-32-or-64-bit

    -Programs are supposed TO not view or download if they are not installed on your computer

    -http://helpx.adobe.com/creative-cloud/kb/all-apps-displayed-aam.html

    MINIMUM for After Effects and Premiere Pro http://helpx.adobe.com/premiere-pro/system-requirements.html

  • I deleted a lot of files of my goods and cc keeps saying that I have more storage. I'm doing something wrong?

    I have doen not add to 2G

    @mr2016 - you have 7 files in the Archive to https://assets.adobe.com/files?filter=archive and 9 files in the files to https://assets.adobe.com/files. Total storage used for these 16 files is 2.34 GB.

  • File I named for 'Confrontational' - am I doing something wrong?

    I fear that I will lose all the work I did somehow then I wonder about it.  I have Illustrator CC.  I use it on my desktop and laptops under my account.

    I was working on a file ON my desk.  The file is saved to the CC.  When I went to work on the same file on my laptop and then saved, the file has been registered like this:

    conflicted.png

    Is this normal?  Is there a way to avoid a file to be re-appointed for "are in conflict?

    Thank you.

    There is a discussion about this in the forum creative Cloud:

    Why I always get copies in conflict? -Why did he update/sync to the latest change/worm

Maybe you are looking for

  • Pavilion a1000n Front Panel on / off button

    The façade, on/off button no longer works.  What are the technical requirements for it so I can get a replacement from other sources as HP stock is no longer a replacement.

  • Satellite L30 PSL33E: How install drivers XP!

    We have 10 new laptops Satellite PSL33E equipped with vista, unfortunately are hardware software does not run on this operating system. I would like to run windows XP but when loaded the following errors has occurred.Power remained off in windows, do

  • G7 Pavilion: Pavilion g7 system disabled code

    Hello, my laptop requires an administrator password, and after that 3 attempts give me a system off the code of 53758541.  I think this generates a password?  Help, please.  I'm stuck on my laptop Thank you Teekaytee2

  • KSERVICE. EXE in c: Windows/Prefetch

    I get this message every time I login: KSERVICE. EXE - Application error. The exception unknown software exception (0xe06d7363) occurred in the application at location 0x7c812afb. Can someone help me to overome this because it slows down the start of

  • SD205 (switch) and VLAN

    In addition to all my switches Cisco Catalyst (successful), I have a bunch of Linksys SD205 unmanaged switches on my local network. I want to configure my network for VLANs, which means I have all my managed Cisco switches will change to a "Routing"