Re: How to block for NSSavePanel response
Re: How to block for NSSavePanel response
- Subject: Re: How to block for NSSavePanel response
- From: j o a r <email@hidden>
- Date: Tue, 13 Jul 2004 17:13:58 +0200
On 2004-07-13, at 16.47, Bruce Truax wrote:
>
The problem is that the last line which gets the path value executes
>
immediately and does not wait for the save panel to finish because I
>
assume
>
that the save panel executes in a separate thread. Is there any way to
>
block the execution of my calling method until the save panel ends?
It doesn't execute in a separate thread. The point of sheets is that
they are modal for the window to which they are attached, and that they
don't block the main thread like ordinary modal dialogs do (read the
documentation!).
Most of the time you don't need to block execution. Simply save
whatever state you need to finalize the save operation, and then wait
for the sheet to be dismissed. If you can't do that (but I promise you
that you can), you can use a simple save dialog instead of the save
sheet.
j o a r
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.