Help 2 see if it is a 'new' or 'unarchived' document, in 'windowControllerDidLoadNib'

Discussion in 'Mac Programming' started by NeonKingKong, Apr 26, 2010.

  1. NeonKingKong macrumors member

    NeonKingKong

    Joined:
    Nov 14, 2008
    Location:
    Portland, OR
    #1
    A question regarding objective-c / cocoa.

    Hello world. When I launch my application, i have a method getting called inside

    'windowControllerDidLoadNib'

    that basically initializes the application, by calling 'runModalForWindow' on 'NSApplication' with for it's argument, an "intro panel." The intro panel is shown every time it is the case that it is a new document.

    However, when I open archived documents I also get the intro panel. Would there be a way to detect the state of either a new document or opening one, so that inside 'windowControllerDidLoadNib', I could choose the appropriate action?

    Thank you in advance for any replies.

    Sincerely,
    Finley
     
  2. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    What do you mean by "archived"? There is no archive flag on files in Mac OS X like there is in Windows.
     
  3. NeonKingKong thread starter macrumors member

    NeonKingKong

    Joined:
    Nov 14, 2008
    Location:
    Portland, OR
    #3
    I just mean a saved file, a stream of bytes made with encodeWithCoder and such.
     
  4. NeonKingKong thread starter macrumors member

    NeonKingKong

    Joined:
    Nov 14, 2008
    Location:
    Portland, OR

Share This Page