Re: earliest code that runs?
Re: earliest code that runs?
- Subject: Re: earliest code that runs?
- From: Matt Neuburg <email@hidden>
- Date: Thu, 29 Jul 2004 07:21:05 -0700
On Wed, 28 Jul 2004 09:28:10 +0200, Andreas Mayer <email@hidden>
said:
>
Am 28.07.2004 um 04:41 Uhr schrieb Glenn Andreas:
>
>
> applicationDidFinishLaunching is very deceptive. If you have a
>
> document based app which opens a blank document, this will be called
>
> _after_ that blank document is created.
>
>
In that case you might be able to use applicationWillFinishLaunching:
Nope, not early enough. :)
What I was looking for was code that is guaranteed to run before the
initWithFrame: of this widget, yet is not in the class for this widget but
rather in some more general, controller-like location. So far, main() as
recommended by bbum is the only place I've found for that, and that's fine
with me.
The docs on binding to user defaults seem to imply that the app delegate's
+initialize will run before any instance methods:
<
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Con
cepts/NSUserDefaultsController.html>
>
The example in Listing 2 loads the default values from a file in the
>
application wrapper, registers those values with NSUserDefaults, and then
>
registers a subset of the values as the initial values of the shared user
>
defaults controller. The setupDefaults method would be called from your
>
application delegate9s initialize class method
If so, that must be an urban legend. Anyhow, one of the things I like about
science is that one counterexample suffices to disprove the hypothesis. My
app is a counterexample. m.
--
matt neuburg, phd = email@hidden, <
http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.