• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSWindow and how to message it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow and how to message it


  • Subject: Re: NSWindow and how to message it
  • From: Andreas Monitzer <email@hidden>
  • Date: Tue, 22 May 2001 22:52:05 +0200

On Tuesday, May 22, 2001, at 05:01 , John Pannell wrote:

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:
- (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).

Well, my documentation says something different:

- (void)orderOut:(id)sender

Takes the receiver out of the screen list. If the receiver is the key or main window, the NSWindow immediately behind it is made key or main in its place. Calling the orderOut: method causes the receiver to be removed from the screen, but does not cause it to be released. See the close method for information on when a window is released.

So, the correct call is "[myWindow orderOut:nil];".

andy
--
Description forthcoming.


References: 
 >NSWindow and how to message it (From: John Pannell <email@hidden>)

  • Prev by Date: Re: NSTabView question
  • Next by Date: Re: Objective C Books?
  • Previous by thread: NSWindow and how to message it
  • Next by thread: Updated documentation!
  • Index(es):
    • Date
    • Thread