• 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: A REALLY Basic question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A REALLY Basic question


  • Subject: Re: A REALLY Basic question
  • From: Greg Titus <email@hidden>
  • Date: Sat, 20 Jul 2002 12:23:48 -0700

On Saturday, July 20, 2002, at 11:53 AM, Mark Malson wrote:

So I have to duplicate code in saveDocument and in the response method , or
at least call it from two different places to do the same thing.

Yep. Calling it from two different places is exactly what you need to do.

Am I missing something? Is there an alert sheet function that will wait for
the user's response? Or am I just longing for the stone tool of Alert() in
OS 9?

Well, the issue here is that you are using a sheet instead of a modal alert panel. Of course you could use something like Alert() -- NSRunAlertPanel(). But it would block your entire application waiting for the user to respond, unlike a sheet, which lets the user continue to work with other windows.

It is the necessity of letting the user continue to work with other windows in your app that forces the event-driven nature of the sheet APIs. It can't just wait internally for the users response, because your main run loop has to be active during that time.

Hope this helps,
-Greg
_______________________________________________
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: 
 >A REALLY Basic question (From: Mark Malson <email@hidden>)

  • Prev by Date: Re: renaming MyDocument
  • Next by Date: Re: A REALLY Basic question
  • Previous by thread: A REALLY Basic question
  • Next by thread: Re: A REALLY Basic question
  • Index(es):
    • Date
    • Thread