• 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: Being notified of changes to a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Being notified of changes to a file


  • Subject: Re: Being notified of changes to a file
  • From: Dmitri Goutnik <email@hidden>
  • Date: Mon, 21 Jul 2008 20:04:24 +0400

On Jul 20, 2008, at 8:37 PM, Yann Disser wrote:

Hi everyone.

I am trying to execute a ruby script from within a Cocoa application. I want to use NSTask (any better ideas?).

My scripts outputs its progress by printing single lines on standard out containing percentages (e.g. "15%"). How can I update my application continuously depending on that progress? (for progress bars and other output)

Thank you a lot,
Yann

Take a look at AMShellWrapper (http://www.harmless.de/cocoa-code.php).

Another problem is that by default stdout is buffered, so you'll need to turn that off in your Ruby code to get line-by-line output (STDOUT.sync = true).

- Dmitri

_______________________________________________

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


References: 
 >Being notified of changes to a file (From: Yann Disser <email@hidden>)

  • Prev by Date: Re: setting image for person in address book
  • Next by Date: Re: webDAV (lite) framework?
  • Previous by thread: Re: Being notified of changes to a file
  • Next by thread: How to get a table column header with an image instead of text?
  • Index(es):
    • Date
    • Thread