Re: updating UI during long loop using cocoa objective-c
Re: updating UI during long loop using cocoa objective-c
- Subject: Re: updating UI during long loop using cocoa objective-c
- From: Jerry Krinock <email@hidden>
- Date: Mon, 2 Apr 2007 05:31:18 -0700
On 2007 Apr, 01, at 23:53, Bob Smith wrote:
Actually a modal session stays in one thread. The -runModalSession
method is a call-back into the application's run loop, by sending
that you are keeping the run loop going so redraws, event handling,
timers, etc. all continue to operate; but this is just the normal
appkit run loop behavior, not multi-threading.
Yes, that makes sense. I hadn't thought that idea through before I
wrote it.
I've used a modal session with a simple window that has a
progress bar and a Cancel button. I guess it should work with a
table, but that might be pushing the envelope.
However one thing -runModalSession does not do is autoreleasing, so
your modal session code might need to manage it's own autorelease
pools.
Wow! Where did you read that, Bob? I have not allocced any
autorelease pools for my modal sessions, but neither have I seen any
of those "autoreleased with no pool in place -- just leaking"
messages in Console.
_______________________________________________
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