Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7513131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:04:48+00:00 2026-05-30T00:04:48+00:00

I have an application that has a button and a label. When the button

  • 0

I have an application that has a button and a label. When the button is clicked, an asynchronous separate thread is started that calls a Web Service. Once the Service responds, the thread then passes the data back to a function in the MainViewController in the form of an object. However since that function is getting called by the separate thread, it has no way of displaying that data in the UI (main thread). When I try to assign text to a label or change a picture or do any UI manipulation at all, nothing happens.. All UI objects are NULL objects when the function runs. Does anyone have a suggestion as to how I might be able to get data back into the main thread from the spawned thread?

Thought –

I suppose I could store the object in a global variable, but still need to be able to notify the main thread that there is data to go get and display.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T00:04:49+00:00Added an answer on May 30, 2026 at 12:04 am

    You should really look into Grand Central Dispatch instead of manual threading. If your requirements allow you to use it, it will make your life much simpler when it comes to running things in the background and passing data safely between background threads and the UI thread.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have an air application that has a button when clicked opens a new
Hello I have a c# application that has a button Submit and in the
I have an application that has 2 forms. When I click a button on
I have a web application that has a WebDav share for Word that uses
I have an application that has a list of buttons and has customized tooltips.
In my application I have several activities, the main screen has 4 buttons that
We have an application that has to be flexible in how it displays it's
I have an application that has created a number of custom event log sources
I have an application that has Powershell 1 embedded into it, but we need
I have an application that has many different types of objects that each persist

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.