MenuItems run() method that is called from the thread eventdispatching?

Hello

is it? I know that MenuItem itself extends thread, but I wonder why this method is called run() and finally and above all it would'nt be worse if this method would be called from a Thread.

THX

In fact the menu items are run on the thread of the event. You can see this by creating a menu item long-term. The menu will not close and will not refresh the screen.

Tags: BlackBerry Developers

Similar Questions

  • Why almost all javafx methods must be called from the thread of the application?

    I have a pretty big 3D scene that is refreshed every few seconds.

    It takes a while to update the scene, and I wanted to do it in a background thread.

    Problem is that almost every approach I take requires the application-fx thread.

    Now, I understand that change the UI itself must be called in the application thread, so I tried a different approach:

    Create a new group, add all the nodes (which takes the greatest amount of time) and update the component root of the view with the new group.

    I assumed that only the last party required the application thread, but alas this was not the case.

    group.getChildren () .add also requires that the thread of the application. Why?

    node.setLayoutX () also requires that the thread of the application. Why?

    It is a new set of nodes that are not visible and groups yet, so why can't do this in a background thread?

    The reasons of principle (I think) that JavaFX is mainly a single toolbox threaded are described in:

    https://weblogs.Java.net/blog/2004/10/19/multithreaded-toolkits-failed-dream

    That said, if you manipulate objects that are not part of an active scene, then it should work.  The dream that failed has what to do with the components who participate actively in the molten, interactive GUI.  If you're interacting with only the components out of the screen, then it (should be) without issue.

    Please, create and post an example minimum, executable that replicates the question.

    (Please ensure that the example is minimal and executable).

    In addition, what is the cause as your application "takes some time to update the scene?  Computers are today quite incredibly fast.  Of course, there are valid reasons for some things take time, I wonder what these are in your case.  What is the time?  If your executable example can include something reasonably representative of what you're done which shows something that will take "some time", would be great.

    What you have described so far, I feel that, even if there is no problems with threads, your proposed approach would not fix your performance problem.

  • FlexUnit ant - running tests that make calls to the server

    Hello

    I am using BlazeDS in my project to connect to a Tomcat server. I have configured my services in the file services - config.xml and past the location of the file as an argument to the compiler in Flash Builder.

    I have some unit tests that make calls to the asynchronous server. When I run these tests from Flash Builder, the thin running tests. But when I run the tests via the flexunit ant task, these tests only downtime while the other tests pass. In addition, it seems like the server is contacted at all as my messeges newspaper in my code aside server are not visible.

    I tried passing the path to the file services - config.xml and the root of the application context in the mxmlc Ant task that compiles my TestRunner.mxml file:

    "< mxmlc file="${main.src.loc}/flexUnitTests/TestRunner.mxml "output="${bin.loc}/TestRunner.swf ">"

    < dir = "${lib.loc library path}" append = "true" > "

    < include name = "*.swc" / >

    < / library path >

    < element path-source-path = "${basedir}" / src "/ >"

    < element path-source-path = "${basedir} /locale/ {local}" / >

    < compile .verbose-stacktraces > true < / compile .verbose-stacktraces >

    true < compile .headless-server > < / compile .headless-server >

    < compiler.services > C:\myApp\Source\WebServer\WebContent\WEB-INF\flex\services-config.xml < / compiler.services >

    < compile .context-root > myApp < / compile .context-root >

    < / mxmlc >

    No use. My tests still expire. Here is my flexUnit task:

    < target name = 'test' depends on 'compile' = >

    <!-run FlexUnit tests and publish reports->

    < flexunit

    " swf="${bin.loc}/TestRunner.swf ".

    workingDir = "${bin.loc}" "

    toDir = "${report.loc}" "

    haltonfailure = "false".

    verbose = "true".

    localTrusted = 'true '.

    headless = "${headless}" >

    < source dir = "${basedir} /locale/ {local}" >

    < include name = "*.properties" / >

    < / source >

    < dir = "${lib.loc library}" / > "

    < / flexunit >

    I guess I'm missing something - a way to tell Ant about the location of my server or something like that. Help, please!

    Thanks in advance.

    Maury

    or create a config replacement for testing services. It would be able to resolve the server url if the swf file served from a web server.

  • ERROR, called from the thread NON-INTERFACE QThread

    I am trying to load an image using QtConcurrent:map at the same time and I received this error.

    WARNING: ApplicationPrivate::context: ERROR called NON-INTERFACE QThread thread (0xf9ff68, name = "thread (pooled)" ")
    Fatal: ApplicationPrivate::context: method called from the UI thread

    I simplified the code as follows:

    imagescaler::queuescaling{
    ..    mimageScaling = new QFutureWatcher(this);
    mimageScaling->setFuture(QtConcurrent::mapped(mImageList, scaledImage));
    ..
    }
    
    Image scaledImage(QString file_name) {
       QImage qImage;
       bb::ImageData imageData(bb::PixelFormat::RGBA_Premultiplied, qImage.width(),
      qImage.height());  // causes error
      return imageData;
    }
    

    Anyone know what the problem is or how to work around?

    Thanks for point out the bb:ImageData.  Never noticed the incompatibility.  Image converts ImageData to initialization, so it does not create an error.  However, if I return an ImageData rather than the Image it does not crash.  I then simply convert ImageData of Image in the UI thread and it works very well.

    I'm curious to know why I can return a blank image and I can return an imageData, but I can't go back an Image that's been converted from ImageData.  Do not understand what can or cannot be done outside the UI thread.

  • getLocation() method cannot be called from event thread

    Hello

    I use a thread that runs an executable object, which gets gps location. This thread is called in the constructor of the form. The first time, it works fine, but then I get the error getLocation.

    class GetGPSThread extends Thread
    {
    GPSRunnable _gpsObject;
         
    GetGPSThread()
    {
    _gpsObject = new GPSRunnable();
    }
         
    public void run()
    {
    _gpsObject.run ();
          
    While (! _gpsObject.isFinished ())
    {
    try {}
    Sleep (200);
    } catch (InterruptedException e) {}
    Generative TODO catch block
    e.printStackTrace ();
    }
    }
          
    Renew the screen
    If (_gpsObject.getLatitude ()! = 0 & _gpsObject.getLongitude ()! = 0)
    {
    UiApplication.getUiApplication () .invokeLater (new Runnable()
    {
    public void run()
    {
    loadScreen (_gpsObject.getLatitude (), _gpsObject.getLongitude ());
    }
    });
    }
    on the other
    {
    UiApplication.getUiApplication () .invokeLater (new Runnable()
    {
    public void run()
    {
    Dialog.Alert ("your position not found");
    }
    });
            
    }
         
    }
         
    }

    "This thread is called in the constructor of the screen".

    We see this code in your constructor?.

    I guess you really want to say this thread is 'start '.  Don't forget that

    . Run()

    does not run a Thread, it executes the run() method in the Thread.  To start a separate Thread, you must use

    . Shart().

  • I continue to receive calls from numbers not available with an Indian accent saying that they are from the Technical Department of windows and I have a problem with my computer.

    Original title: scams?

    I continue to receive calls from numbers not available with an Indian accent saying that they are from the Technical Department of windows and I have a problem with my computer. Normally, I just say that I don't have and hung up. Today, I took a little further and he said that they discovered that I had loads of malware/viruses etc and that they could identify with them. I was obviously very suspicious because he seemed to have my correct Windows ID number and with care on 'Run' he told me to type things like cmd eventviewer and inf where he referred to a file 1394.pnf. I stopped while he asked remotely to access my computer. However, I got a phone number 01916450337 and his P786000 id I noticed that many people are posting on your forum-is this another one of those scams?

    Continue to put the phone down. They are all crooks.

    They get you to open Event Viewer, because there are words such as 'critical' and 'error' along the this.

  • Error #1009 when sound inside game, a movie clip that is called to the scene with child add method

    What is supposed to happen

    I have a clip that is called when the user clicks a button. When moving clip appears music is expected to play. When the user clicks the close button the music stops and the clip is removed from the scene.

    But then I get an error

    When I test the movie I get the following error:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to mc_playSong / frame2 () [mc_playSong::frame2:6]

    This is the code that calls the clip on the stage (no problem here):

    Call the video clip with the song played on stage

    stage.addEventListener (MouseEvent.MOUSE_DOWN, goButtons);

    function goButtons(event:MouseEvent):void

    {

    If (event.target is song_bnt)

    {

    SoundMixer.stopAll ();

    addChild (myPlaySong);

    myPlaySong.x = 558;

    myPlaySong.y = 384;

    Event.stopImmediatePropagation;

    }

    The following code inside the clip is called to the scene. The music is meant to play:

    Stop();

    Variables for listening to music

    var RJPlaySong:RJSong = new RJSong();

    var RJPlaySongChannel:SoundChannel;

    Music for plays

    stage.addEventListener (Event.ENTER_FRAME, startRJSong); (I think that the error in the code is in this function. When I comment on him I don't get error.)

    function startRJSong(event:Event):void

    {

    RJPlaySongChannel = RJPlaySong.play ();

    }

    Stop all sounds, sets variables to null and calls a send event that removes the clip of the scene.

    bnt_closeSong.addEventListener (MouseEvent.MOUSE_DOWN, closeCreditSongScreen);

    function closeCreditSongScreen(event:MouseEvent):void

    {

    SoundMixer.stopAll ();

    RJPlaySong = null;

    RJPlaySongChannel = null;

    dispatchEvent (new Event ("RemoveMCsong"));

    }

    Someone at - it ideas? This seems to be a pretty simple question, but I can't understand it.

    I meant that you have quoted just to be taken literally.  If it's still not clear what I say or what did your code, try the following in order to demonstrate the IT change... This code to be...

    stage.addEventListener (Event.ENTER_FRAME, startRJSong);

    function startRJSong(event:Event):void {}

    trace ("I can do this all day");

    }

    After doing this, you can see why you want to only call the function once, and you could eliminate most of it and just put...

    RJPlaySongChannel = RJPlaySong.play ();

    Instead, or as I said originally, you can change it to be...

    function startRJSong (): void

    {

    RJPlaySongChannel = RJPlaySong.play ();

    }

    startRJSong();

  • Strange call from the India, claiming that they had been notified that there was an error in my computer?

    Just got a call from the India, claiming that they had been notified that there was an error in my computer? Is this normal? About an hour earlier, I have defraged my computer?

    Hello

    It's a SCAM

    they want or money on your part for programs without value or make an identity theft on you to get even more money and get your internet banking passwords and credit card information, you get allows you to download the software to 'fix' or 'test' for your computer

    read this:

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

    Microsoft has none of the unsolicited telephone calls to help you fix your computer

    In this type of scam cybercriminals are calling you and claim to be of Support technique Microsoft. They offer help with your computer problems. Once scammers have earned your trust, they try to steal and damage your computer with malicious software, including viruses and spyware.

    Although the law enforcement can trace phone numbers, often authors use pay telephones, disposable cell phones or stolen cellular phone numbers. Better avoid fooling themselves rather than try to repair the damage afterwards.

    Treat all unsolicited sceptically telephone calls. Don't provide personal information.

    If you receive an unsolicited call from someone who claims to be from Technical Support Microsoft, hang up. We do not have such calls.

    If you think you might be a victim of fraud, you can report it. For more information, see: what to do if you think you have been scammed.

  • Unexpected calls from the Germany

    Yesterday, I started to receive calls from the Germany. People say that they missed call on their phone, that's why they are callimg me back. I checked the call history and I did not call these numbers. Is it possible that there is a double reality of my number online?

    Hello

    Sorry, you encounter this problem,

    Please file here:

    Contact customer service

    TIME ZONE - US EAST. LOCATION - PHILADELPHIA, PA, USA.

    I recommend that you always run the latest version of Skype: Windows & Mac

    If my advice helped to solve your problem, please mark it as a solution to help others.
    Please note that I usually do not respond to unsolicited private Messages. Thank you.

  • I just got a call from the same thing with the eventvwr in the race, I wrote down everything, is it a scam?

    I just got a call from the same thing with the eventvwr in the race, I just wrote it down at the bottom, if it is a scam What are they actually accomplishing?  This gives them access to our computers?  They do not seem to be asking for money or that comes up when they try to "fix"?

    You are not alone! See...

    I received a phone call from someone who claims to have a Virus (August 10, 2009 &ff; 40 pages)
    http://answers.Microsoft.com/thread/4489f388-d6de-416d-9158-0079764bb001

  • I just got a call from the service center of the sentence above, Microsoft asked them to call

    original title: Onlinepcmasters

    Hello

    I just got a call from the service center of the sentence above, Microsoft asked them to call.  They said that I got the virus bluebird on my computer and it would break in 2 days!  I guess it's a total scam

    See this post sticky at the top of the forum:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-security/i-received-a-phone-callemail-from-someone-saying/98a199f4-82cd-4433-b333-045451b89e2d

  • Loading error when you try to load the Halo 2 "files are missing or damaged in the installation directory. A few important files required to run this game are missing from the installation directory.

    Original title: load error when you try to load Halo 2

    People at Microsoft, I have a problem trying to load Halo 2 on my dv7 Paviliaon with Vista and the 2.8 GB Intel Centrino 2 processor. When I try and load the game, I get and error stating: "the files are missing or damaged in the installation directory. A few important files required to run this game are missing from the installation directory. "It bothered me for several reasons. One: the disc that I use is an original disc out of the box so hsould have no problem. Two: the game has been loaded previously on the same computer without apparent problem at the time. It has been deleted (don't remember why) and when I tried to reinstall, the error came. Three: I did as recommended and updated all programs and drivers, nothing works. So my question is, how do I reinstall Halo 2 and what this problem will arise if I decide to buy and load Halo 3?

    Thank you for your time in advance.

    Hello

    As you are facing problems with Halo 2, I suggest you to refer the link for better support:

    http://forums.haloonwindowsvista.com/forums/

  • BlackBerry smartphones can not make calls from the home page or the phone book.

    I've had my curve for several months now and the other day, that my most young got a hold of it... I don't know how they do it, but my children can do things with my phone and computers that I did not know they could do... In any case I tried to access my voicemail by organizing the 1 on the homepage and it took me to instead call log, so I tried to make a call from the phone book by selecting the name pressing on do it call button and no as soon as I actually had to go into the call log and manually type the number.

    My question is... What did do?  It is very aggravating and I would ask him, but he is two... I know he did not drop it or I would take it to a service provider.  All of the suggestions.

    Thank you

    If you go in your call log icon or by phone, click your menu button and go to Options. Then, go to the General Options. See if your the home screen dial is set to Yes.

    Also try to reset your device by removing the battery for 1 minute and replacig it to leave the unit restarts. Try it later

  • Phone calls from the India saying my computer sends messages it has smart software.

    I get phone calls from the India saying that my computer sends messages it has smart software.  Is it a scam?

    Or-
    Next time have an air horn next to your phone and just before giving them a breath
    say "the smart software makes a sound of '...
    Or perhaps softer and say "because I had so many calls that I have."
    asked the FBI/CIA (MI6, or similar) in cooperation with the Government of your
    beautiful country to tap my phone... ».

    .

  • Phone call from the Adobe billing department

    I received calls from the 408-454-2934 number, my caller I.D. not stating that it is from San Jose, California. Although Adobe's corporate headquarters is located in San Jose, the phone numbers do not match. After a search fast on google, I found that it could be a scam of collections, the appellant to do pretend to be collections of Adobe to update credit card information. More probably because your payment is late or not can not be processed. If you do not need to update your payment information, on your Adobe account page instead of by phone. I believe that adobe would simply suspend your account until you were able to continue to make payments. Anyone calling for the credit card or other personal information is probably a scam these days. Be careful.

    The telephone number provided by you is not scam, it's a number between our billing service that helps you update the credit card details, if necessary, inform & help if payments are blocked due to any reason.

    Concerning

    Stéphane

Maybe you are looking for