Re: Distributed Objects
Re: Distributed Objects
- Subject: Re: Distributed Objects
- From: Kirk <email@hidden>
- Date: Mon, 27 Aug 2012 14:34:42 -0500
This may be true now.
Historically there have been runloop-dependent functionalities that would not work correctly if started in applicationDidFinishLaunching: .
To avoid hair-tearing I just always define an applicationDidBeginRunLoop: method that is invoked by a zero-delay perform launched from applicationDidFinishLaunching: . Any main thread startup ops that can be deferred to that time are invoked from there. If nothing else, it helps reduce dock-bounce time.
It might be obsolete voodoo - I've been doing it for more than a decade.
Kirk Kerekes
(iPhone)
On Aug 27, 2012, at 2:04 PM, Kyle Sluder <email@hidden> wrote:
> On Mon, Aug 27, 2012, at 10:40 AM, Kirk wrote:
>> There isn't a run loop running yet at applicationDidFinishLaunching:.
>>
>> Defer your code with performSelector: afterDelay:0
>
> While this is true, the very next thing after
> -applicationDidFinishLaunching: will be NSApplication calling
> [[NSRunLoop currentRunLoop] run]. So Gerriet's original code should work
> without manually calling -run, and -performSelector:afterDelay: should
> have no effect.
>
> --Kyle Sluder
_______________________________________________
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