Re: sheets
Re: sheets
- Subject: Re: sheets
- From: "Clark S. Cox III" <email@hidden>
- Date: Mon, 2 Jun 2003 14:30:21 -0400
On Monday, Jun 2, 2003, at 13:37 US/Eastern, Brent Gulanowski wrote:
Not a specific question, more one of strategies. I have been playing a
bit with sheets, and have become confused by how to cope with their
asynchronous nature. I feel that I am losing the thread of my workflow
when I post a sheet and the method returns immediately. I know that it
calls another method when it ends, but I am confused in that it seems
like I suddenly have two threads of execution when I only want one.
The method that called the sheet cannot do anything else, at least not
related to the sheet's purpose, so when it returns, where does
execution continue from? When the onEnd method returns, where does it
go?
There are no threads involved, when the method that begins the sheet
returns, you simply return to the normal event processing (this is what
allows you to put a sheet on one window, but still accept events in
other windows.
Or should I just continue going about my business from there? But it
seems that the sheet does not completely get dismissed until the onEnd
method returns, which means the sheet hangs there, waiting. That looks
stupid and annoys the user, so I want to return from the onEnd method
ASAP.
Call orderOut: on the sheet in your method to remove it from the screen
before you return.
But how do I get back to doing whatever process I needed to do? Where
does execution go? I guess normally it goes back to the event loop,
and waits for a user event. The only solution I have come up with is
that I can post a notification in the onEnd method and pick it up
somewhere else in my document object. Seems awkward, seeing as how I
already had the execution thread before I called the sheet.
--
http://homepage.mac.com/clarkcox3/
email@hidden
Clark S. Cox, III
_______________________________________________
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: | |
| >sheets (From: Brent Gulanowski <email@hidden>) |