NSApp is nil

  • Several time now I've run into NSApp being nil in relation to
    coredata--particularly in core data awakeFrom methods.  If I call
    [NSApplication sharedApplication], I get a valid NSApplication
    object.  Before I go through all my managed object subclasses
    replacing NSApp with a sharedApplication call I'm wondering why this
    is.  Does anyone have any idea why NSApp wouldn't be valid in this
    context?  Isn't NSApp supposed to be global and valid after the first
    call to sharedApplication?

    Thanks,

    ->Ben

    --
    "When a stupid man is doing something he is ashamed of, he always
    declares that it is his duty."
      - George Bernard Shaw
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today