• 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: Closing window with "red button"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Closing window with "red button"?


  • Subject: Re: Closing window with "red button"?
  • From: "Stephen Deken" <email@hidden>
  • Date: Tue, 31 Oct 2006 15:00:57 -0600

A second question regarding how things are implemented.

You really ought to look at some of the documentation before asking questions like these. It's really very comprehensive:

<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/index.html>

If I close my main window with "red button" (upper left corner), how
is that action implemented?

[window close];

Asigned in the main menu I have a button for showing the window again.
I have tried makeKeyAndOrderFront: but that just make my app crash.

If your window is set up with 'release on close' checked, it gets freed when it is closed. Your app will crash when trying to send a message to that released window (or it might not crash, but it won't work, anyway).

Stephen Deken
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Closing window with "red button"? (From: Marcus Pedersén <email@hidden>)

  • Prev by Date: Re: Closing window with "red button"?
  • Next by Date: Re: sort, cut and paste
  • Previous by thread: Re: Closing window with "red button"?
  • Next by thread: [MEET] November CocoaHeads Meetings
  • Index(es):
    • Date
    • Thread