Start a new thread once a screen is shown.

Hello

I need to initialize a database after the first display of my application is showed, and I can't find the way.

What method of screen I can use to do this?, I tried onUiEngineAttached, but this start the new thread before show the screen and it shows once the thread.

I tried this also

public public static void main (String [] args) {mainapp to PAP = new MainApp();

theApp.enterEventDispatcher ();

}

/**

* Default constructor

*/

public MainApp() { final HomeScreen screen = new HomeScreen();

pushScreen (screen);

Executable task = new Runnable() {}

public void run() {}

DataBaseManager.init ();

UiApplication.getUiApplication () .invokeLater (new Runnable() { public void run() {}

screen.showTaskEnd ();

}

});

}

};

New Thread (task) .run ();

}

But it shows the screen after run the new thread.

How can I do this? any ideas?

Thank you

Advertisement

start a new thread within invokelater works very well.

Tags: BlackBerry Developers

Similar Questions

  • How to reply or start a new thread?

    Am connected, but can not find any "New message" button to be able to ask questions. What is needed other than the Member and need help? I posted more before there are two 2 years and the last in June. Seems there were a few changes I don't know and cannot circumvent this missing part for display.

    Robert is off, then I'll take it...

    You can not respond to the 'Search' page You will need to click on one of the threads highlighted blue,

    "RE: Dell Optiplex 960 TPM and Bitlocker issues."

    Will take you to the specific thread. From there, you can click the button answer.

    To start a new thread, go to the Board of Directors had need, such as general office equipment. On the right in the empty search bar, click new message.

  • Start a new Thread in the activate() method

    Hello

    When my application is started or resumed after a phone call etc... I would like to perform some tasks in the activate() method. First of all, I would like to start a new Thread to call web services a bit, and when it's done, I would like to update the user interface.

    I tried to do. I created a new class that extends the Thread in the run() method, I placed all the relevant web service calling and code in the method activate() my main thread that I have done:

    MyThread myThread = new MyThread();

    myThread.start ();

    But I noticed that nothing seems to be done. So I simplified my code by removing all web service of the run() method calls and replaced by a wait method (500), followed by a method call to update the user interface (in this case it creates just a new ButtonField, just for testing purposes).

    But ButtonField never gets created.

    The new thread doesn't seem to be from all.

    Any suggestions?

    Thank you very much.

    Have you tried setting stop and monitoring of execution points using println?

    First of all, is called same activate()?

    Secondly, run() is reached?

    When the thread does the work of the user interface, if you have that in a synchronized block try block invokeLater rather.

  • How to start a new thread and receive alerts by mail of the RTO?

    Hello

    I would like to point out a few question in OTN and at the same time, I'm intrest to enter the forums of mails in my mail box.

    Can you help me!


    Thank you

    IndianDBA wrote:
    I would like to point out a few question in OTN and at the same time, I'm intrest to enter the forums of mails in my mail box.

    You could probably help you as well.

    There is a link from the FAQ at the top right of the page - FAQ stands for "Frequently asked Questions" and usually provides answers to these questions. And your just questions are answered there if you care to look.

    I see that not only "you wish to post a few questions, but you have actually"have published the first question". If you seem to be on your way. Just note that there are many forums, and we encourage you to ask in the correct forum - find them by clicking on the 'Home Forum' link (top-left) and scrolling down (and don't forget to read the areas 'more... ("If you can't find what you want.)

    AND - if ask you technical questions, don't forget to include the operating system (including the publishing or distribution and version depending on the OS), version of the product (even if you don't think this is important) and error messages (copied, do not re-typed, if possible)

  • "Start new Thread" is absent most of the time

    I'm not new to Dell Community, however, I post here in desperation of shear.

    I consider myself a person of intelligence average and the average Visual acuity.  I did not understand why sometimes I see the link "Start new Thread" and at other times, I would not.  I thought that there are a few steps to find what I didn't know.  I thought maybe the few times wherever I found it, it was by an unknown action, that I had taken.

    This morning I wanted to see a poster of beginner in another forum of the community on this community forum.  I tried looking for information before giving it to the other poster.  I have spent the last hour looking for this and other tips from the top downwards, for the link to start a new Thread.  I even read the how-to Post wikii and came out of the magnifying glass.  I couldn't find these 3 words!

    Then suddenly, after looking the other boards and back here, these 3 words were in plain view.  It's the durnest thing I've ever seen.  Sometimes the link is visible and sometimes it isn't!  What can I do for a beginner to this community when I have used Dell forums for 2 years, is having difficulty posting?

    What is someone having the same problem?  Whatever the issue, I will be very happy when it is fixed, it is very frustrating and time consuming!

    Thank you.


  • Set title for the new thread

    Hi guys,.

    I have created a new thread, but do not know how setTitle for her, this is my code:

    public class MyThread extends Thread
        {
    
            String htmlString = "

    ABG

    Definition
    "; public MyThread() { } public void run() { try { ByteArrayOutputStream output = new ByteArrayOutputStream(); Base64OutputStream boutput = new Base64OutputStream( output ); output.write( "data:text/html;base64,".getBytes() ); boutput.write( htmlString.getBytes() ); boutput.flush(); boutput.close(); output.flush(); output.close(); BrowserSession bSession = Browser.getDefaultSession(); bSession.displayPage( output.toString() ); } catch( Exception e ) { System.out.println( "Exception: " + e ); } } }

    and this is my screen when starting the new thread:

    Threads have titles.

    If you are referring to your HTML content, why don't use you the title tag and see what happens?

  • When I start a new page in FF4 is always on the right side of the screen and the menu bar also goes by the window. If I click on the address bar is displayed correctly

    It is a problem I've had since the first race of FF4 beta. All sites are on the right side of the window to start a new page, then it works very well after the first.

    Create a new profile exclusively for version 4.0 beta and create a shortcut on the desktop with Pei 'profile' attached to the target to launch this profile.

  • TestStand new Thread VS LabVIEW 'Call & Forget' an asynchronous call

    Hello world

    Here is an example from the site ni.com showing how to use LabVIEW to validate a notifier TestStand.  I changed the example to adapt to the situation, I need to use it.  I have an example that works very well (when I use a new thread TestStand to start the notifier VI) and an example that does not work (when I use an asynchronous call to LabVIEW 'Call & forget' to start the notifier VI).

    I would like to understand why this does not work in the second case. The reason why I prefer the 2nd situation which currently does not work, it is that I try to eliminate all multiple threads in an outdated sequence, written by someone else a few years ago that I can't troublesoot it and update the code to make it work with the new reality of today.

    Also, to my knowledge.  I do not understand why the second strategy does not work.  The notifier of forms reference is the same thing and hadled in the same way.  I have included my example with 2 situations files in the files of distinct sequences.

    Thanks in advance to the person who will be able to enlight me.

    Nien

    Hi again,

    It is true that I don't get any errors in the sons of the "bus" error when you try to set the alert of LabVIEW system but now I noticed what is wrong. In my example that does not work, the TestStand notifier reference is a valid reference inside the "call Notifier and Forget.vi", but it became an invalid Refnum once inside the 'Notifier.vi '.

    You are right that it is not a question for the forum TestStand.  It is only associated with LabVIEW. If I run the VI "Call notifier And Forget" only using LabVIEW, I see that any reference (such as a queue reference) became an invalid Refnum once inside the 'Notifier.vi '.  It seems that it is not possible to run a valid french Refnum a node "Start Asynchronous Call.

    I'll try to get comments in the forum of labview.  Sorry to be totally off topic here

    Nien

  • Step failed in New Thread does not display in the report

    Hello

    I call a sequence of sub in a 'new topic '.  A step inside this sequence of subroutine fails.

    The end result is the Test failed because it is supposed to be, but the step failed does not show.  (I show not only failed in the report).

    Can it be fixed?

    Thank you

    Rafi

    It is correct. If you look at the entry Point of the execution of the process template, you'll notice that once completed execution of the main sequence, the generation of reports and other things start.

    If spawn you a sequence in the new thread from the main sequence, MainSequence could finish before the subsequence ends its execution and the results of the sous-suite propagate to MainSequence. So as Ray mentioned, you can force the MainSequence expect the subsequence full run using a queue time.

    See attached screenshot and/or example:

  • I can't start a new project

    Hello

    I just bought and installed first Elements 8 and when I go to the boot screen where it allows you to organize, start a new project and open project, it won't let me start a new project.  When I click on it, it shows the little 'I am working bar' for about 15 seconds then stops.  If I click it again, it does the same thing.

    I already have installed 8 elements (not create) and that works very well.  In addition, the tab organize in the start of the first screen works very well too.  It's just the buttons new project (and Open Project).

    I have Vista Home Premium 64-bit.

    Can anyone help?

    Thank you.

    First of all, make sure that you have lots of free space on the hard disk and that your hard drive is defragmented freshly.

    Then, go to Windows Update and manually download even non-critical updates. Also make sure you run the latest version of Quicktime, which plays a vital role in how the program works.

    http://forums.Adobe.com/thread/416585?TSTART=0

    Finally, if all else fails, uninstall first Elements 8 and reinstall it.

    -->

  • Why is - FCP so complex: How can I simply leave a project and start a new, a new destination?

    Why is not more intuitive FCP to create the new project and close one on the screen, and then start a new and let me choose where I want to create it?

    I need a 3rd party app to import video content miniDV external HARD disk. Stuff is there for you.

    Now, I open the PCF and try to start a new project. However, this old project still there let me possibility to do it in the same folder: of course, being a tidy person, I don't want.

    I want to create another folder on the external HARD disk.

    What I am doing wrong?

    Hello.

    Keep in mind that a project must reside in an event and an event must reside in a library.

    You can have as many libraries as you want a store them wherever you like (even if you don't save them on a volume of time Machine.

    So start a new project in a new library or in a new event in an existing library to keep things orderly.

    Not sure I understand the part you need a third-party for mini DV application. You shouldn't have anything other than the FCC.

    Russ

  • Hello. I installed the latest update of Firefox and when I start a new tab page displays not now my entry from google line.please help.tks

    Hello. I installed the latest update of Firefox and when I start a new tab page displays not now my google input line. I use Windows 10. Until the recent update (v4.1.01) each time I started a new tab the new page would show the google search entry line which is my default. Can help you to restore this feature? TKS

    Hi, 41 of Firefox, you must use the add-on tab override (browser.newtab.url replacement), to make changes to the page tab.

    Once installed, open the Add-ons (Ctrl + Shift + A) Manager > Extensions, and then look for the new tab override and click Options to set your preference.

    Notice, if you want only the new tab to be the same as your home page, you can use the Add on new tab homepage instead.

    You will then need to restart Firefox for all changes to take effect.

    If your question is resolved by this or another answer, please take a minute to let us know. Thank you.

  • Cannot start a new conversation with relay of sms on the Mac or iPad.

    Very strange problem and I have tried seemingly everything. SMS relay works fine on all my Apple devices. I can send and receive messages either SMS or iMessage. However, I can't start a NEW conversation with relay. I can only answer to the conversations that are already started. (does not matter if I started or the other party)

    When I want to send texts to my boyfriend who doesn't have an active conversation in the list of messages I have to text him to my main iPhone (that the relay is activated on) and after that the convo appears right in messages on mac, the other my iPhone and my iPad, and I can continue to send messages from any device.

    I tried to close off the coast of relay and allows once again. Restart the phone. Restart the mac. Disabling iMessage on the iPhone. Ensure that all devices are on the same wifi network. A lot of things that shouldn't matter...

    A few tips here after a reset of the iPhone?

    Also note that my iPhone is running iOS 10 beta 2 now, BUT I had this problem for some time. Long before I had the beta version.

    Well, that's disappointing...

  • Anyway to interrupt a conversation iMessage and start a new conversation, with no history?

    My sister and I, on the coast of the United States, facing each other, use iMessage.  My brother was in the hospital and it has updated me on his State.  He died yesterday.  I want to continue to use iMessage whenever I can, but I don't want to continue to see messages to him with details of his failing health.  Is it possible to access a new conversation with her, so I can't see the previous posts?  It's very painful.

    Currently using the last update everything on the iPhone 6, 64gig.

    Delete the conversation, and then start a new. The new conversation is started, none of the old iMessages will show.

    If you're in the conversation in Messages, leave the conversation by pressing the blue "< Messages" at the top of the screen.

    Press 'Edit' at the top left of the screen

    Select the conversation (check the bubble on the left)

    Press 'Delete' in the bottom right

    You can also select individual messages to remove from an existing conversation by:

    Tap/hold on the desired message

    Select 'other '.

    Check the individual messages you want to delete

    Press the trash downstairs left

    Press 'Delete Message'

    You also have the option here of 'Delete All' at the top left of the screen

  • When you try to start Firefox I get a message saying "a copy of Firefox is already open. Only one copy of Firefox can be open at a time. "I started a new profile, but the Profile Manager always tells me that by default it is still in use.

    When you try to start Firefox, even once, I got a message saying "close Firefox. A copy of Firefox is already open. Only one copy of Firefox can be open at a time. "This issue is addressed in Mozillazine but nothing I've tried there seems to work. I started a new profile in the profile manager that gets at least upwards and the functioning, but strangely enough the Manager also told me the old (default) profile is still underway, although I can't find a way to close it. Also, I can't find the default profile in my Profile Manager. can anyone help?

    This has happened

    Just once or twice

    == I thought that I had left Firefox and he was new.

    I get the same problem from time to time. It is not a solution but I go into Task Manager (select by right clicking on an empty area of the start bar) and under the research process and, invariably, there is a 'hidden' version to use the FF. I selects & close via Task Manager and then am able to restart FF.

Maybe you are looking for

  • CL10-B-100 satellite - cannot boot from USB Live of Linux

    I just bought a Satellite CL10-B-100 (PSKVEE - 00300CG 6) with only 8.1 Windows preinstalled. I need to boot from a linux live usb - without success now. No MSC instead of UEFI option available in BIOS. Secure boot disabled, USB set as first boot pri

  • Vista SP @ shows as installed and has not been

    After several attempts to install the Vista SP2 (he downloaded o.k. I finally managed a month ago in istalling it manually.) But Windows Update now constantly remind me that I need the important update SP 2 (KB948465), while review of the history of

  • To access the files on hard drive

    I have an external hard drive that I can't access to and open files in the folder on my desktop. It gives me the error message: access is denied. I can open the files on my laptop. My desktop is running xp and my laptop runs 7. All of the suggestions

  • Error 641 cannot connect to Windows Installer and it could be installed incorrectly & error 80070641for Windows Update.

    Original title: Windows Installer does not properly. I am running with Vista SP 2 and since June, I have had many updates windows installation failures and get error 641 80070641 and just. Also have had difficulties to install other software. Tried t

  • Internet wireless on the laptop works do not under Vista

    Hi guys. My laptop cannot connect to wireless internet. I tried to use ConfigFree Diagnostic tests already installed on my computer, reset the router, and even taking on the router for 30 seconds and put it to. On my laptop wireless switch is turned