Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT object as ActiveX control

The thread runningDeferredEvents is only one hack that gets around the
posting
but will not fix the fact that the SWT event loop is not running.  For
example, sync
and async runnables won't ever get executed because these happen when the
SWT event loop is idle.

There are two possible fixes I can think of.  One is to investigate Windows
Hooks
and try to install a hook that let's SWT filter at the message before it is
dispatched
by the OLE container.  The other is to investigate OLE.  There was an OLE
method
that a container is supposed to call that allows the ActiveX control to
process the
MSG before the OLE container does.  Your ActiveX component could implement
it and examine the message and tell the OLE container not to dispatch it.

I don't really have time to help more.  Veronika, the "SWT goddess" (and
OLE
queen) is on vacation.  She'd know the name of the OLE method off the top
of
her head.

Steve



                                                                                                                                           
                      "Seith Philipp,                                                                                                      
                      BRC/EDF1"                       To:      platform-swt-dev@xxxxxxxxxxx                                                
                      <Philipp.Seith@indramat         cc:                                                                                  
                      .de>                            Subject: Re: [platform-swt-dev] SWT object as ActiveX control                        
                      Sent by:                                                                                                             
                      platform-swt-dev-admin@                                                                                              
                      eclipse.org                                                                                                          
                                                                                                                                           
                                                                                                                                           
                      07/23/02 12:12 PM                                                                                                    
                      Please respond to                                                                                                    
                      platform-swt-dev                                                                                                     
                                                                                                                                           
                                                                                                                                           



The problem is the one you suspected. We started a timer in our surounding
ActiveX control and called runDeferredEvents cyclic and the selection
listeners are called. Another problem we have is, that the Enter-key does
not cause a line break in a multiline text field.
Do you know what is the problem here?
BTW, I think that a working ActiveX solution with SWT could make SWT *the*
UI library for companies which have the need to embed Java UI into
Microsoft
containers (and there are many of them: Look at Top 25 RFE at
developer.java.sun). The solution Sun formerly was supplying (i am talking
about the beans.ocx) didn't work at any time in all possible containers
(VB,
.NET, MFC, ATL). Do you think it's possible that the SWT team will release
something like a official solution in the future?

             Philipp

             Subject: Re: [platform-swt-dev] SWT object as ActiveX control
             To: platform-swt-dev@xxxxxxxxxxx
             From: "Steve Northover" <Steve_Northover@xxxxxxx>
             Date: Mon, 22 Jul 2002 11:16:06 -0400
             Reply-To: platform-swt-dev@xxxxxxxxxxx


             Do you have an SWT event loop or are the events dispatched by
the
             container?  I suspect the problems is that SWT posts events
for
later
             execution lock step with the corresponding event from the
operating
system.
             If you don't have and SWT event loop, even though there is
nothing
really
             for this event loop to do (ie. events are being dispatched by
the C
code in
             the container, not SWT), the posted events won't run.

             A quick hack/test of this proposition would be to temporarily
hack
             Widget.postEvent(int, Event) to call Widget.sendEvent(int,
Event).

             Steve

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






Back to the top