Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] ActiveX fire event fails in multithreading mode (with AfxBeginThread)

Just a guess, maybe should handle the event in the GUI thread, such as using
display.syncExec() or display.asyncExec()?

jml
----- Original Message -----
From: "Andras Lang" <andras.lang@xxxxxxxxxxxxxx>
To: <platform-swt-dev@xxxxxxxxxxx>
Sent: Friday, October 11, 2002 7:39 AM
Subject: [platform-swt-dev] ActiveX fire event fails in multithreading mode
(with AfxBeginThread)


> Hi,
>
>     a try to integrate an activex component into Eclipse. Followings:
>
> 1. Create a simple activex control and a simple java plugin.
> 2. Define a simple fire event in the activex control. ( e.g. void
> FireTest() )
> 3. Start in the activex control a new thread with "AfxBeginThread".
> 4. Define in the plugin a simple eventhandler for this event.
>     (e.g.
>         controlSite.addEventListener(1, new OleListener() {
>             public void handleEvent(OleEvent event) {
>                 Shell shell = parent.getShell();
>                 MessageDialog.openInformation(shell, "activex fired me",
> "");
>             }
>         });
>     )
> 5. In the new afx thread try to call the fire event. It will fail. If
> you
> try to call this fire event from the main thread of the activex control
> it
> succeded, but from the new afx thread it will fail.
>
> Any thoughts?
> Andras Lang
>
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top