J9 SWT Shell.open() causes pocketIE to close [message #442555] |
Tue, 07 September 2004 20:55 |
Eclipse User |
|
|
|
Originally posted by: joeSPAMNOTwlarson.hotmail.com
We have constructed a little widget which allows the user to input a
signature with the stylus. This widget is launched when the user clicks on
a link in Pocket IE, which in turn connects to our mini java HTTP server
running under J9, which triggers the creation of this widget. However, in
order to get the widget to show up, I have to do a Shell.open(); When this
is done, Pocket IE is closed. I've used RAPI debug to verify that Pocket IE
indeed gets instructions to unload.
I've tried this in several versions of SWT (2026, 2136, 3101, and more) and
got the same results. The source of Shell from version 2.0.2 shows the
source of open() as:
public void open () {
checkWidget ();
bringToTop ();
/*
* Feature on WinCE PPC. A new application becomes the
* foreground application only if it has at least one
* visible window before the event loop is started.
* The workaround is to explicitely force the shell to
* be the foreground window.
*/
if (OS.IsWinCE) OS.SetForegroundWindow (handle);
setVisible (true);
if (!restoreFocus ()) traverseGroup (true);
}
Is it possible the OS.SetForegroundWindow() is causing pocket IE to close
erroneously? I cannot find the source for the OS class.
Thanks,
Joe Larson
|
|
|
|
Re: J9 SWT Shell.open() causes pocketIE to close [message #442638 is a reply to message #442633] |
Thu, 09 September 2004 15:51 |
Eclipse User |
|
|
|
Originally posted by: joeSPAMNOTwlarson.hotmail.com
"Christophe Cornu" <christophe_cornu@ca.ibm.com> wrote in message
news:chpmi5$g0t$1@eclipse.org...
> Hi Joe,
>
> SetForegroundWindow simply calls the WIN32 API of the same name. It's only
> there to bring the Shell in front of the current apps - like PocketIE.
> You can try replacing shell.open() with shell.setVisible(true) and see if
> that makes any difference.
> Does everything work fine if you don't call shell.open() - and fake user
> input?
I'll drop a question on the ms.public.pocketpc.developer group and find out
if they have a clue if SetForegroundWindow ought to do this.
Meanwhile, nothing else I've tried, including setVisible(true), seems able
to cause the swt window to appear.
>
> > Pocket IE is closed
> Is it 'minimized' or really gone - not present in the task list anymore?
> Could your HTTP server have caused it to crash or timeout in some ways?
>
Good question. PIE is actually gone from the task list. The timeout
thought is interesting, I doubt it could be involved but I'll take a poke at
that possibility.
Thanks for the reply!
Joe
|
|
|
Powered by
FUDForum. Page generated in 0.03116 seconds