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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]