Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] MacOS X port status?


Careful. The point is, if the spec says that an operation behaves a certain way, then plugins *will* be written to take advantage of it. You can argue the merits of the behavior until you are blue in the face, and not change that.

Please understand, the kind of change you are describing would be a fundamental change in the behavior of SWT. It would not happen without significant discussion amongst all the committers *and* a strong consensus of opinion. Even given all that, we likely couldn't get the change through the API revision procesess without a lengthy deprecation process.

I'm sorry, but I have to agree with Andre on this. If Cocoa can support the SWT event model then it is a candidate for use as the basis of the Mac port. If it can not support the SWT model, then it is not a candidate.

McQ.



Maurice Parker <maurice@xxxxxxxxxxxxxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

11/23/2001 09:13 AM
Please respond to platform-swt-dev

       
        To:        <platform-swt-dev@xxxxxxxxxxx>
        cc:        
        Subject:        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

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top