NSWindow and how to message it
NSWindow and how to message it
- Subject: NSWindow and how to message it
- From: John Pannell <email@hidden>
- Date: Tue, 22 May 2001 09:01:06 -0600
Hi there-
I have encountered puzzling behavior in trying to send a message to a
window - I clearly am missing something very simple. Here's the details:
In IB, I have created a window (myWindow) and a controller
(myController). myController has an outlet called myWindow, and I
control-dragged the connection from myController to myWindow.
myController also has an outlet called myButton, and an action called
hideMyWindow. The button in IB has been connected to the hideMyWindow
action.
In PB, I have
- (void)hideMyWindow:(id)sender
{
[myWindow orderOut];
}
Problems abound - while building, I am told "method not found", while
running, I get the error "-[NSWindow orderOut] : selector not
recognized". So, clearly everything is hooked up OK in IB (since I get
the confirmation that the message is being sent to an NSWindow), but for
some reason NSWindow doesn't want to respond (even though the
documentation says this is a perfectly reasonable message to send to a
window).
If you can, please reveal (gently) the silly error in my ways :-)
Hope everyone is enjoying WWDC...
John