Re: A REALLY Basic question
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.