How can I update the user interface controls in the UI thread

Hi all

I want to do a custom image to display this URL source support.

I start a thread to ask the image of the network data, and then update the display of the image with the data, but I get the error:

ApplicationPrivate::resourceManager: ERROR called from the thread of user QThread (0x81eeb8c) interface
ApplicationPrivate::resourceManager: A user interface thread named method

It's my code segment:

class URLImageView: public CustomControl, public QThread
{
public:
    URLImageView();
private:
    void run();

    ImageView* mImageView;
    Container* mRootContainer;
};

URLImageView::URLImageView()
{
    mRootContainer = Container::create().background(Color::Gray).preferredSize(100,100);
    mImageView = ImageView::create().image(QUrl("asset:///button.png"));

    mRootContainer->add(mImageView);
    setRoot(mRootContainer);
    start();
}

void URLImageView::run()
{
    //get data from network
    //...
    //...
            //create image from binary data        Image* image = new Image(pixelBuffer);
    mImageView->setImage(image);
}

I know that in the old BB OS (Java Platform), I can get the lock of event request like this UI:

synchronized (Application.getEventLock())
{
        // I can update UI control here
}

Is it same way to Cascades BB10 or what is the right way, if I want to update the user interface in the UI thread?

Thank you

This looks like what signals are useful for, when it is connected with the option QueuedConnection. I don't have a link for you, but I'm sure that you can get with this description.

Tags: BlackBerry Developers

Similar Questions

  • I managed to see the profile of the artist in Apple's music. How can I update the profile picture?

    I managed to see the profile of the artist in Apple's music. How can I update the profile picture?

    This is a user forum. No Apple itself is allowed to answer your questions here.

    You are probably better contact Apple Support directly to get an answer to your question.

  • How can I update the rubrics with WebServices?

    How can I update the rubrics with WebServices?

    /Anyone/ has some success with this?

    It becomes important to our business objectives in order to solve the problems within the control elements.

    I can't enter the number of line by line in order to uniquely identify it. How can I get that number, so I can send it with xml "update"?

    A little nudge in the right direction would be much appreciated.

    Aaron.

    You must use a field on the form as the one on the line items, NOT the line number that appears in the journal of the line item. If I understand correctly, the LineItemIdentifier can be any field on the form, even the short description. It is best if you know you will use web services to update the line items, you add a (potentially hidden) field to the form and fill that with unique values when positions are created. If you are working with existing elements of line, then you must choose a field that will be usually unique within a single record and hope, you don't have a lot of duplicates.

  • Satellite L300D - 24 d how can I update the graphics driver?

    Hello

    How can I update the driver for my ATI Radeon 3100 graphics card. (Win Vista 32 bit)
    I download and installed the new ATI Catalyst worms. 10.12.

    If I change my graphics card options, there is always the old driver installed... Worms. 22.04.08 8.479.0.0
    Also, it is not possible to change the settings for graphic resolution higher than 1280 X 800 Pix.

    Thanks for the help,

    Fun1975

    First, you must use the page to Toshiba display driver.
    The use of other drivers can lead to highest GPU temperature and cause overheating.

    But if you want to use other drivers, you can do so at you own risk.
    In order to install another driver, go to Device Manager, mark the graphics card, then press on uninstall button.
    Then the driver should be uninstalled.

    After you restart the laptop, you can try to install the new version.

    > It is also not possible to change the settings for graphic resolution higher than 1280 X 800 Pix.
    The internal screen for laptop supports 1280 x 800 high resolution. It is not possible to choose a higher value.

  • I had to change my Apple ID because of accusations of fraud but my iPhone 6s 9.2 still has the old Apple ID and will not accept old or new passwords. How can I update the iPhone with the new Apple ID 9.2 6s?

    I had to change my Apple ID due to fraudulent charges but my iPhone 6s 9.2 still has the old Apple ID and will not accept old or new passwords. How can I update the iPhone 6s 9.2 with the new Apple ID and password? I tried to perform a complete reset, but which requires the Apple ID and password that doesn't work not... pretty frustrated here.

    YYou have unlink the old iphone you as find my iphone the reset all devices on this subject from your account then plug it to your iTunes then restore a new one after that reset password that under the new phone then connect

  • How can I update the gps of streets & trips

    How can I update the gps of streets & trips (not sure which version)

    Hi CP agent v-2jeen

     

    Because the question is specific to the streets and trips you contact that it can support the assistance team. I would recommend posting your query to the community of Microsoft streets & trips. Please visit the links below to find a community that will support what ask you in the right direction.

    http://social.Microsoft.com/forums/en-us/streetsandtrips/threads

    You can also check out below help links-
    http://support.Microsoft.com/ph/1058#TAB0
    http://www.Microsoft.com/streets/en-us/support-and-training.aspx

    I hope this helps.

  • How can I update the expiration date on my credit card account?

    How can I update the expiration date on my credit card account?

    How can I update the expiration date on my credit card account?

    Go to your Bank and get a new card.

  • I'm not having implemented the cd with me. How can I update the window components. by mistake I uninstalled the

    I'm not having implemented the cd with me. How can I update the window components. by mistake I uninstalled the

    Reinstall windows components, you've accidentally deleted when you have the game CD with you.

  • URGENT! How can I update the build on BB store

    Hi all..

    I want to update the build on BB store. Please help me how can I update the build on bb store after the download of version 1.

    Now, I need to download version 2.

    Thank you

    After signing, choose manage products, then in the line that corresponds to the product that you're gong to update, you should find an icon "+" under the heading of press.  A click on it.

    I don't remember having a problem, this the first time, so I suspect it's pretty much follow your nose after that.

    It is also available help documentation:

    http://developer.BlackBerry.com/DevZone/blackberryworld/adding_and_apps_and_releases_in_blackberry_w...

  • How can I update the BIOS on my Sony Vaio laptop using disc or usb? Note: I can't windows at all.

    Hi, I want to know how can I update the current bios on my sony laptop using the disc or usb.

    I can't access the windows on the laptop at all, because I'm getting STOP: 0 x 00000 "a5 error that says: your bios is not fully compatible with acpi.»
    This error prevents me to access any live disc or recovery disks.
    I would like to learn more about records tho method.
    Thank you.

    Take it to a repair shop, you have damaged the card mother/connections

  • Exporting DNG from Lightroom, but the thumbnail in os x Finder still shows the unmodified image. How can I update the thumbnail?

    I export a DNG from Lightroom on my iMac (OSx 10.11.2) but the thumbnail in os x Finder still shows the unmodified image. How can I update the thumbnail?

    Export to DNG will always export a unretouched photo non-modified. Your changes are in the XMP of DNG file as text, and most of the viewers of DNG files cannot interpret or use this text. So, it seems that when you export photos in DNG, Lightroom has done what it is supposed to do.

  • vCenter Server is a virtual machine, how can I update the host

    I have 2 guests in our environment, I have updated the host of the 2nd, but may not know how to upgrade the 1 host because vcenter server runs as a virtual machine on it. This has me thinking that I don't have the installation program as best as possible.

    Basically, we have 2 Guest boxes and a small box of DC. I don't really want to run vcenter on the dc area. What would be the best soltuong for our environment? Can I keep vcenter as a virtual machine? If Yes, how can I update the host it will run on?

    Thanks in advance everyone... Chris

    I was afraid of that say you that

    Well in this case you may need to update the host manually (see for example http://communities.vmware.com/people/vmroyale/blog/2011/09/15/updating-esxi-5--single-use-esxcli-how-to) even with the need to manually update the host on which vCenter Server is running, I would always run as a virtual machine. There is usually not that many updates.

    André

    Post edited by: a.p..

  • How can I update the patch of dps to my Adobe CS6 class

    How can I update the patch of dps to my Adobe CS6 class

    http://helpx.Adobe.com/Digital-Publishing-Suite/help/installing-digital-publishing-tools.h tml

    Neil

  • How can I update the displayed variables?

    I use 6 Captivate to create a TV like quiz game in which two teams are competing. I created two variables to track each team's points and these variables are displayed on each slide of the question. The action on the success of each slide in question uses a tip action to allocate 100 points to the appropriate team. The variable updates correctly; but only shows the updated value when the next slide appears. How can I get the variable to update as soon as you click Submit (i.e. when the correct feedback is displayed)?

    I'm new to advanced so please be very detailed in your response!

    You define an action on success to increment your variable, just without doubt?  What you're missing here is that the success and events on the last attempt for quiz questions only fire once the legends of feedback are rejected.  The only way you can get these events fire when the user clicks the submit button is to remove the captions of your comments.

  • How can I update the location in Photos?

    I'm trying to update the location of my pictures.  I can change it under "Info" in the menu of the window (set the PIN on the map) and that works fine, but when I go to the Image menu and then click on setting Date and time, and then change the time zone on the coast is where I live in California where I took the photo, choose San Diego in the dropdown selection menu it It's default back to Los Angeles after that I click on Adjust.  How can I get the city to stay on my choice?

    Tthat selection has nothing to do with the location, it's for setting time tags on the photos, zon hour option moves both the appropriate amount.

  • How can I update the content of my application

    Hello everyone I am new to phone gap and I'm creating an app from Gallery News and events for iPhone and android using the gap app builder phone. After I design the app in adobe Dreamweaver and publish the application how can I modify the content of news and Live Gallery to the user who already download my application... Please help thanks

    You should have a backend (your own server or some 3rd party) where you can manage the new data.

    The backend should provide Web services with the data (JSON or XML).

    And then, in your application, you must use calls XHR (AJAX) for Web services to get the data, analyze, and display in your application.

Maybe you are looking for

  • HP Pavilion dv6750en drivers

    Hello everyone I have a HP Pavilion dv6750en and I want to downgrade from vista to xp professional but I can't find the correct drivers, I watch http://h10025.www1.HP.com/ewfrf/wc/softwareList?OS=228 & LC = on & DLC = in & CC = US & lang = to & Produ

  • Help to remove Bing

    I get messages from Bing to delete Bing.  I tried everywhich way that anyone can think.  It must be a Virus and I am protected. I'm on Google.  I want Bing to my computer and it please tell me how to do it.  I'm tired messages get from them to remove

  • Cards USB & Windows XP Logo

    I just got a new card (8 GB) USB and when connecting to my laptop I get the following message: the software you are installing has not passed Windows logo testing to to verify its compatibility with Windows XP. "" Keep your installation of the softwa

  • How is this remove you an email and all forward which is made by the beneficiary with her?

    I sent a mail that I have to remove the disorder is, the person has redirected already. I need help fast!

  • When I'm not a recovery to factory settings.

    I can't recover after recovering accidentally to the factory instead of more recent recovery settings