On 10 Jun '08, at 1:27 PM, Michael Ash wrote:

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.

It's not impossible, but it would require either that every window ran in a separate thread (as in the BeOS) or that the Cocoa frameworks supported coroutines. Coroutines are quite feasible in C, using setjmp/ longjmp style trickery; but when I investigated this I saw that using them would probably seriously confuse Objective-C's exception handling, and possibly NSRunLoop too.

John, you should look at the Cocoa conceptual docs that describe the use of sheets. There are probably a bunch of examples of sheet usage in the sample code too, if you search for "beginSheetModalForWindow:".

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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