Re: Understanding the Run loop idea and the updating of controls during long operations
Re: Understanding the Run loop idea and the updating of controls during long operations
- Subject: Re: Understanding the Run loop idea and the updating of controls during long operations
- From: Andy Lee <email@hidden>
- Date: Sun, 07 Nov 2010 09:50:12 -0500
On Nov 7, 2010, at 6:05 AM, eveningnick eveningnick wrote:
>>> I assume i should call a one run through the runloop manually, but how?
>> I recommend that you not attempt to "invert" the event loop or build one
>> yourself. The "modal session" methods of NSApplication
>> (-beginModalSessionForWindow:, -runModalSession:, and -endModalSession:)
>> seem like a good fit for your requirements. It does entail implementing
>> your long operation as a bunch of short work units.
>>
> Could you please explain what will happen when i call these methods?
<http://www.google.com/search?q=beginModalSessionForWindow+site:developer.apple.com>
(The "site:developer.apple.com" is a handy trick.)
<http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/WinPanel/Concepts/UsingModalWindows.html>
<http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html>
I think it would be better to refer to specific parts of the docs that are not clear than to ask a general "what will happen" question.
That said, I wonder if anyone knows of a blog entry or Apple example that specifically shows how to display progress in a modal window or sheet.
--Andy
_______________________________________________
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