FROM : Jens Alfke
DATE : Wed Apr 30 18:18:15 2008
On 29 Apr '08, at 7:16 PM, Michael Ash wrote:
> There were a lot of problems with Cocoa and returning to the runloop
> without returning back the way I came
Yes, I can see that there would have to be a rule that only the main
coroutine (i.e. the original 'real' stack) gets to use the runloop.
I think this can be dealt with by having (in your example) a separate
coroutine that brings up the sheet; then that coroutine blocks until
the sheet is dismissed, returning control to the main routine that
returns back to the runloop.
In the actor model, most of the application code would be in the form
of actors waiting for specific events (menus, buttons, etc.), that
would get a message when the event occurred, do their thing, then
return or yield. The main routine would mostly be receiving the events
from the runloop and dispatching them as messages to actors.
—Jens
DATE : Wed Apr 30 18:18:15 2008
On 29 Apr '08, at 7:16 PM, Michael Ash wrote:
> There were a lot of problems with Cocoa and returning to the runloop
> without returning back the way I came
Yes, I can see that there would have to be a rule that only the main
coroutine (i.e. the original 'real' stack) gets to use the runloop.
I think this can be dealt with by having (in your example) a separate
coroutine that brings up the sheet; then that coroutine blocks until
the sheet is dismissed, returning control to the main routine that
returns back to the runloop.
In the actor model, most of the application code would be in the form
of actors waiting for specific events (menus, buttons, etc.), that
would get a message when the event occurred, do their thing, then
return or yield. The main routine would mostly be receiving the events
from the runloop and dispatching them as messages to actors.
—Jens
| Related mails | Author | Date |
|---|---|---|
| Jens Alfke | Apr 29, 19:04 | |
| Jim Roepcke | Apr 30, 00:55 | |
| Jens Alfke | Apr 30, 02:26 | |
| Michael Ash | Apr 30, 04:16 | |
| Jens Alfke | Apr 30, 18:18 | |
| Michael Ash | Apr 30, 21:35 | |
| Jens Alfke | Apr 30, 23:37 | |
| Michael Ash | May 1, 00:35 |






Cocoa mail archive

