PDA

View Full Version : awakeFromNib




liptonlover
Jun 12, 2008, 05:16 PM
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
Jun 12, 2008, 05:17 PM
Why not just uncheck the box in IB that causes the window to open on load?

liptonlover
Jun 12, 2008, 05:30 PM
I tried that first... all it does is put that window in the rear.

liptonlover
Jun 12, 2008, 06:24 PM
ugh I need this help as soon as possible please someone...

liptonlover
Jun 12, 2008, 06:30 PM
sorry for the triple post... but for some reason NOW visible at launch works.

Darkroom
Jun 14, 2008, 11:13 AM
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
Jun 14, 2008, 12:00 PM
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.