Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

liptonlover

macrumors 6502a
Original poster
Mar 13, 2008
989
0
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...
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Why not just uncheck the box in IB that causes the window to open on load?
 

Attachments

  • Window Attributes copy.jpg
    Window Attributes copy.jpg
    117.8 KB · Views: 79

Darkroom

Guest
Dec 15, 2006
2,445
0
Montréal, Canada
sorry for the triple post... but for some reason NOW visible at launch works.

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.
 

liptonlover

macrumors 6502a
Original poster
Mar 13, 2008
989
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.