• 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: Progressbar Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progressbar Question


  • Subject: Re: Progressbar Question
  • From: Mike Abdullah <email@hidden>
  • Date: Sun, 18 Feb 2007 01:12:22 +0000

Indeed this is correct. If you step through the method in the debugger you will see that it should pause a little (or maybe a lot!) during that particular call. During that time, the whole thread/ application is locked and so the progress indicator can't draw itself.

You have two options:

1.
Set the progress indicator to perform threaded drawing, it will draw during your NSTask running. HOWEVER, please do not do this as it means the app itself is still locked up during this process, which users will not like. So:


2.
As suggested, use readToEndOfFileInBackgroundAndNotify instead. Everything will work nicely.


Mike.

On 17 Feb 2007, at 23:03, Michael Babin wrote:


On Feb 17, 2007, at 3:23 PM, Tom Jones wrote:

So my first app is to use NSTask to run a Command line app and parse it's
output. I've got it to run and I thought I did well until I tried to start
with the progressbar. It wont start until my CLI app as finished.

results = [fh readDataToEndOfFile];

Not 100% sure of this, but I'm guessing that readDataToEndOfFile blocks until the pipe is closed by your CLI app (when it is finished). You might want to look into using readToEndOfFileInBackgroundAndNotify instead.


--
Michael Babin email@hidden
Order N Development, LLC http://www.orderndev.com/
Goldfish Aquarium for Mac: http://www.lifeglobe.com/product/ index.php?pltid=2&ref=OrderNDev



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
40mikeabdullah.net


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >Progressbar Question (From: Tom Jones <email@hidden>)
 >Re: Progressbar Question (From: Michael Babin <email@hidden>)

  • Prev by Date: Re: Need Better Understanding of Modal Delegates
  • Next by Date: Having a hard time...FSIsAliasFile
  • Previous by thread: Re: Progressbar Question
  • Next by thread: Re: Progressbar Question
  • Index(es):
    • Date
    • Thread