Re: Updating a progress bar from a code loop

2008-06-10 Thread Adam Leonard
I think you should definitely try to get the loop working in another thread. I know it can be tricky, especially if you are dealing with some thread unsafe classes, but it is worth it and will likely be very beneficial in the future. (On an utterly unrelated aside, this looks interesting: h

Re: Updating a progress bar from a code loop

2008-06-10 Thread Graham Cox
On 11 Jun 2008, at 2:40 pm, j o a r wrote: On Jun 10, 2008, at 3:17 AM, Graham Cox wrote: 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 ev

Re: Updating a progress bar from a code loop

2008-06-10 Thread j o a r
On Jun 10, 2008, at 3:17 AM, Graham Cox wrote: 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 ev

Re: Updating a progress bar from a code loop

2008-06-10 Thread Hamish Allan
On Tue, Jun 10, 2008 at 11:17 AM, Graham Cox <[EMAIL PROTECTED]> wrote: > 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

Re: Updating a progress bar from a code loop

2008-06-10 Thread Quincey Morris
On Jun 10, 2008, at 03:17, Graham Cox wrote: 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 sho

Re: Updating a progress bar from a code loop

2008-06-10 Thread Michael Ash
On Tue, Jun 10, 2008 at 3:17 AM, Graham Cox <[EMAIL PROTECTED]> wrote: > 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"

Re: Updating a progress bar from a code loop

2008-06-10 Thread Graham Cox
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

Re: Updating a progress bar from a code loop

2008-06-10 Thread Hamish Allan
On Tue, Jun 10, 2008 at 7:24 AM, Graham Cox <[EMAIL PROTECTED]> 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 __

Re: Updating a progress bar from a code loop

2008-06-09 Thread j o a r
On Jun 9, 2008, at 11:24 PM, Graham Cox wrote: I have a lengthy routine that I'd like to show a progress bar for. The routine runs in a while() loop, and calls a delegate which implements the progress update. My progress window opens OK but nothing gets updated, though I know that it's get