NSTask dilema...

2010-03-31 Thread Jean-Nicolas Jolivet
I have to run a bunch of NSTasks and I'm not sure to proceed considering I want to be able to update the UI when a task is completed, and I want the process to be as fast as possible (obviously)... So far I tried a couple of ideas but they all had their problems: - I tried launching the tasks

Re: NSTask dilema...

2010-03-31 Thread Ken Thomases
On Mar 31, 2010, at 1:21 PM, Jean-Nicolas Jolivet wrote: I have to run a bunch of NSTasks and I'm not sure to proceed considering I want to be able to update the UI when a task is completed, and I want the process to be as fast as possible (obviously)... - I tried launching the tasks on

Re: NSTask dilema...

2010-03-31 Thread Jens Alfke
On Mar 31, 2010, at 11:21 AM, Jean-Nicolas Jolivet wrote: - I tried launching the tasks on the main thread but it locks up my UI and I can't update my progress bar... Only if you explicitly call -waitUntilExit. So don't do that. Normally the task API is asynchronous. So launch it, then go

Re: NSTask dilema...

2010-03-31 Thread Sherm Pendley
On Wed, Mar 31, 2010 at 2:21 PM, Jean-Nicolas Jolivet jeannicolasco...@gmail.com wrote: I have to run a bunch of NSTasks and I'm not sure to proceed considering I want to be able to update the UI when a task is completed, and I want the process to be as fast as possible (obviously)... So

Re: NSTask dilema...

2010-03-31 Thread Jean-Nicolas Jolivet
Ok apparently everyone agrees on the fact that I should just launch the tasks on the main thread, and avoid using waitUntilExit (using only the notifications to know when a task completes...)! :) Well, it makes sense I guess haha! I'm pretty sure I tried it before but the problem was that my

Re: NSTask dilema...

2010-03-31 Thread Kyle Sluder
On Wed, Mar 31, 2010 at 12:01 PM, Jean-Nicolas Jolivet jeannicolasco...@gmail.com wrote: Well, it makes sense I guess haha! I'm pretty sure I tried it before but the problem was that my progress label was not being updated... so I assumed that my UI was locked up... it turns out using