• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Displaying progress of lengthy operation: complication with bindings and threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Displaying progress of lengthy operation: complication with bindings and threads


  • Subject: Displaying progress of lengthy operation: complication with bindings and threads
  • From: "Sean McBride" <email@hidden>
  • Date: Fri, 31 Mar 2006 13:50:50 -0500
  • Organization: Rogue Research

Hi all,

Some operations in my app take several minutes and so the app currently
SPODs; I would prefer to add a progress bar.  The app uses bindings and
is single threaded.

One idea is to spawn a worker thread to do the lengthy work like this:
  for (num items)
    lengthy computation
    performSelectorOnMainThread:@selector(advanceProgBar:)

But the 'lengthy computation' part would read and write to my model
objects, and those objects are connected to UI objects via bindings.
I've searched the archives and this has been discussed before.  KVC/KVO/
bindings are not thread safe.  Which- I believe, I'm no threading
expert- means it's entirely unsafe for my worker thread to touch any
object that is involved in bindings.

So now I'm really unsure of how to best approach this, any suggestions?

Thanks!

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Displaying progress of lengthy operation: complication with bindings and threads
      • From: Mike Blaguszewski <email@hidden>
    • Re: Displaying progress of lengthy operation: complication with bindings and threads
      • From: Sean Murphy <email@hidden>
    • Re: Displaying progress of lengthy operation: complication with bindings and threads
      • From: PGM <email@hidden>
  • Prev by Date: Re: NSTask secretly a class cluster?
  • Next by Date: table view, popup, bindings: more grief...
  • Previous by thread: [Core Data] Passing data from MOC1 to MOC2 without saving MOC1
  • Next by thread: Re: Displaying progress of lengthy operation: complication with bindings and threads
  • Index(es):
    • Date
    • Thread