[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] MacOS X port status?
|
Hey,
On 11/23/01 5:57 AM, "Andre Weinand" <weinand@xxxxxxx> wrote:
>
> Maurice,
> this is a great start!
> Everything works witin the limitations you've mentioned.
>
> The only hurdle I still see is that Display.readAndDispatch() does
> not return after processing a single event. Without that it is not
> possible to implement nested modal event loops.
Can you point me to an example of this being done in the Examples or the
Eclipse source? IMHO the message pump (readAndDispatch / sleep) shouldn't
be exposed outside of the SWT packages anyway. Everyplace that I have have
seen readAndDispatch used, nothing interesting is happening in the loop
anyway.
Combined with the fact that readAndDispatch does *not* guarantee that it
will return after processing a single event (it may have some others it
needs to process), I didn't think that I was breaking it's behavior too
badly.
I could be wrong. Show me where an application does something interesting
while in message pump loop and I will have to change my opinion. ;-)
>
> Do you think it would be possible to implement the exact SWT behavior
> of Display.readAndDispatch() on top of Cocoa?
Yes, it is possible although I am trying to avoid having to do it. I would
like to use Cocoa's event model exclusively if possible because it "free"
(no one has to code it).
Bottom line though is that if I do have to do a message pump style event
model, NSApplication can be subclassed and all events sent from the Window
Manager to the application can be intercepted by overriding sendEvent() and
put into a queue that readAndDispatch works it's way through.
-Maurice