On Tue, Jun 10, 2008 at 1:10 PM, John Love <[EMAIL PROTECTED]> wrote:
> I have chosen the title "Prevent Asynchronous operation of
> beginSheetModalForWindow" because I use various calls to
> beginSheetModalForWindow in many parts of my app code and in one case I need
> the calls to didEndSelector to be completed *before* the code that follows
> beginSheetModalForWindow is executed (see MyDocument.m below).

I'm sorry to have to tell you this, but you are doomed.

Sheets are inherently asynchronous. To understand why, think about
what happens when two sheets are displayed on two different windows.
The user can dismiss them in any order. What happens if sheet A
displays, then sheet B displays, then the user goes back and closes
sheet B? If there were a synchronous API the code would have to
somehow jump down the stack to where you're waiting for A, while
somehow leaving the stuff that's waiting for B live farther up the
stack. This is quite simply impossible in a C-based language.

Is there some reason you can't just put all of the "after" code in the
endCalculateSheet: method?

Mike
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to