• 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: Window with no document ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window with no document ?


  • Subject: Re: Window with no document ?
  • From: Neil Earnshaw <email@hidden>
  • Date: Tue, 26 Aug 2003 09:23:39 +0100

Bob,

When I click the close button on the
window my controller's close method never gets called. If I call the
controller's 'setDocumentEdited:YES' the close button shows dirty but
when clicked, still no close method call. Am I missing something ?

One possible problem occurs if you are using your own notifications in the app and at some point your window controller does [nc removeObserver:self]. This will stop -windowWillClose: being delivered to it when you hit the close button on the window, though -windowShouldClose: still gets delivered because its not a notification.

Also, has the window controller been made the window's delegate in IB? This is a prerequisite for getting -windowWillClose:

-Neil
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Window with no document ? (From: Bob Miller <email@hidden>)

  • Prev by Date: Building menu's lazily
  • Next by Date: Re: Formats supported by NSImage?
  • Previous by thread: Window with no document ?
  • Next by thread: Number Formatting
  • Index(es):
    • Date
    • Thread