• 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: NSApplication Quit bug; Another Form of it. Learning Cocoa sample shows related bug.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSApplication Quit bug; Another Form of it. Learning Cocoa sample shows related bug.


  • Subject: Re: NSApplication Quit bug; Another Form of it. Learning Cocoa sample shows related bug.
  • From: tyler <email@hidden>
  • Date: Tue, 17 Jul 2001 15:49:19 -0700

Hi Erik,
Interesting. Thanks for the perspective. I'll look forward to NSDocumentController.

I do think that the code that reanimates the objects in the NIB should dispose of them (?)

Given what you say, that it's not supposed to call the dealloc, then I guess the sample programs in the Learning Cocoa book need to be modified for some future edition to make them work properly.

thanks for responding.

peace,
tyler


On Tuesday, July 17, 2001, at 03:41 PM, Erik M. Buck wrote:


----- Original Message -----
From: <email@hidden>
Additionally, we can agree that one could, perhaps, implement a
-applicationShouldTerminate somewhere (delegate to app?) and that

See NSDocumentController that does this for you already. You have not
gotten far enough in your book.

P.S. There are good reasons why terminating an application does not
automatically iterate over every open window calling -windowShouldClose:.
Among those reasons may be the fact that some applications may enable the
user to cancel the termination. Another reason is that the order in which
windows are closed may matter in some applications. If the windows were
already closed automatically, that would defeat the purpose of canceling the
quit. You are trying to build your own document control infrastructure and
therefore must handle the -applicationShouldTerminate case. If you use the
provided document controller infrastructure the work has already been done
for you.

Even after writing all of that, I am sympathetic to your concern. Prior to
Rhapsody we all had to write our own document controller logic. Many people
just copied the classes out of the old (pre-rhapsody) TextEdit.app example
program or the old (pre-rhapsody) Draw.app program or the old (pre-rhapsody)
Yap.app program.

In summary, you want NSDocumentController.


  • Follow-Ups:
    • Re: NSApplication Quit bug; Another Form of it. Learning Cocoa sample shows related bug.
      • From: "David P. Henderson" <email@hidden>
  • Prev by Date: Re: Help with help
  • Next by Date: Re: NSApplication Quit bug; Another Form of it. Learning Cocoa sample shows related bug.
  • Previous by thread: NSApplication Quit bug; Another Form of it. Learning Cocoa sample shows related bug.
  • Next by thread: Re: NSApplication Quit bug; Another Form of it. Learning Cocoa sample shows related bug.
  • Index(es):
    • Date
    • Thread