sheets
sheets
- Subject: sheets
- From: Brent Gulanowski <email@hidden>
- Date: Mon, 2 Jun 2003 13:37:31 -0400
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? 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. 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.
I cannot find any discussion of this that goes into the issues I am
trying to resolve, so I must assume I am missing some small but subtle
point. If anyone knows what I am talking about and can clarify, I would
appreciate it.
Brent Gulanowski
--
Ten thousand years ago, the state of the art was a goat. -- Cory
Doctorow
_______________________________________________
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.
- Follow-Ups:
- Re: sheets
- From: "Clark S. Cox III" <email@hidden>