update ui while processing in carbon

Discussion in 'Mac Programming' started by printf, Nov 17, 2008.

  1. printf macrumors regular

    Aug 27, 2008
    my app will sometimes process large files and during such processing, i'm throwing up a modal window with a progress bar control to inform the user of the um... progress.

    naturally, the progress bar never gets updated because of the heavy processing, so i'm wondering if carbon provides any simple way to achieve this besides resorting to some elaborate threading system. or alternatively, if there's another clever way to show progres without too much effort.

    and btw, i did try setting up pthreads, but just crashed my app when it tried to redraw views.
  2. kainjow Moderator emeritus


    Jun 15, 2000
    My guess is Carbon doesn't let you update the UI from a background thread (like Cocoa). You have to tell the main thread to do it.

Share This Page