• 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
Re: Updating a progress bar from a code loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updating a progress bar from a code loop


  • Subject: Re: Updating a progress bar from a code loop
  • From: Graham Cox <email@hidden>
  • Date: Tue, 10 Jun 2008 20:17:46 +1000

Thanks for the suggestions - basically I have to run my loop on a thread, seems to be what you're both saying.

In this case I can do that... though out of curiosity I wonder if there is a way to do this "cooperatively" on the main thread without having to break up the loop doing the actual work. For example, in Carbon one can run the event loop for a short period or just for one event on each cycle of the loop - and this code can live in the progress dialog controller, so it works transparently with respect to the loop that drives the progress indicator. I'm not sure that approach is considered "good" in this day and age though I used it a lot on Mac OS 6/7/8/9. Just wondered if such an approach is feasible in Cocoa.

cheers, Graham



On 10 Jun 2008, at 6:01 pm, Hamish Allan wrote:

On Tue, Jun 10, 2008 at 7:24 AM, Graham Cox <email@hidden> wrote:

How do I give some time to the event loop while I'm running my own loop?

See here for a recent discussion:

http://www.cocoabuilder.com/archive/message/cocoa/2008/6/5/209308

Hamish

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Updating a progress bar from a code loop
      • From: j o a r <email@hidden>
    • Re: Updating a progress bar from a code loop
      • From: "Hamish Allan" <email@hidden>
    • Re: Updating a progress bar from a code loop
      • From: Quincey Morris <email@hidden>
    • Re: Updating a progress bar from a code loop
      • From: "Michael Ash" <email@hidden>
References: 
 >Updating a progress bar from a code loop (From: Graham Cox <email@hidden>)
 >Re: Updating a progress bar from a code loop (From: "Hamish Allan" <email@hidden>)

  • Prev by Date: from CFDataRef to NSString
  • Next by Date: Re: from CFDataRef to NSString
  • Previous by thread: Re: Updating a progress bar from a code loop
  • Next by thread: Re: Updating a progress bar from a code loop
  • Index(es):
    • Date
    • Thread