Re: CFRunLoop usage
Re: CFRunLoop usage
- Subject: Re: CFRunLoop usage
- From: "Alastair J.Houghton" <email@hidden>
- Date: Thu, 9 Oct 2003 10:41:22 +0100
On Wednesday, October 8, 2003, at 06:55 pm, Izidor Jerebic wrote:
The description "window which consumes all events and blocks
application until it is finished" is a modal window. It cannot be
modeless window, unless you have different understanding of the word
modeless.
Yes, it can. Ron doesn't mean that it blocks the application, he means
it blocks further execution of his event handler. (See below.)
Or is there something I do not understand? What exactly do you want to
achieve?
Ron is after writing his program so that it goes:
---> event
|
| (part 1)
|
+---> create window & process events
|
.
.
.
|
<-------------------+
|
| (part 2)
|
<-------+
That is, he doesn't want to exit the original event handler, but would
like the window to be modeless. This is a fairly common idea control
flow on event-driven GUIs, although it is trickier to implement in many
of the OO frameworks (Cocoa included) because the framework typically
provides additional behaviour over and above that provided by the
standard run-loop.
It is probably better to split the event handler into two, and have the
window trigger the second half of the handler when it would have caused
the run-loop to exit in the design above; that is, rearrange things so
that the program flow goes:
---> event
|
| (part 1)
| create window
<-------+
.
. process events (in normal run-loop)
.
---> message from window
|
| (part 2 of original event handler)
|
<-------+
Kind regards,
Alastair.
_______________________________________________
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.