awakeFromNib

Discussion in 'Mac Programming' started by liptonlover, Jun 12, 2008.

  1. macrumors 6502a

    Joined:
    Mar 13, 2008
    #1
    I have a button set up to open a window, and a button to close a window. That works fine. But I want this window to initially be closed. The buttons work, I have an outlet pointing at the window. But when I try:
    - (void)awakeFromNib:(id)sender {
    [window performClose];
    }
    nothing happens. What's wrong?
    Thanks, Nate

    also... when I try posting these questions to the cocoadev mailing list, it immediately sends me a messages saying I need to wait for them to be approved by moderators and I have no clue why. I haven't even been home/online to have said something to cause this...
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Why not just uncheck the box in IB that causes the window to open on load?
     

    Attached Files:

  3. thread starter macrumors 6502a

    Joined:
    Mar 13, 2008
    #3
    I tried that first... all it does is put that window in the rear.
     
  4. thread starter macrumors 6502a

    Joined:
    Mar 13, 2008
    #4
    ugh I need this help as soon as possible please someone...
     
  5. thread starter macrumors 6502a

    Joined:
    Mar 13, 2008
    #5
    sorry for the triple post... but for some reason NOW visible at launch works.
     
  6. Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #6
    yeah, i've had glitchy stuff like that happen with xcode frequently... it often helps to do a clean build, but if that doesn't work a restart should help. unfortunately, xcode sometimes can cause beginners to loose their mind.
     
  7. thread starter macrumors 6502a

    Joined:
    Mar 13, 2008
    #7
    I think I found the bug... though it's not what I thought it was. Apparently doing simulate interface will not make those windows hide at launch, though you'd expect that since it's purely an interface thing. You have to compile your app for it to work.
     

Share This Page