Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » New dialog in Job
New dialog in Job [message #443685] Wed, 29 September 2004 09:01 Go to next message
Johannes Grob is currently offline Johannes GrobFriend
Messages: 11
Registered: July 2009
Junior Member
Hi!

I am desperatly trying to do the following:

I need to display progress to the user, so I run a Job. During the Job
however the user needs to be prompted for some information (which depends on
stuff the Job did up to thst point).
But whatever I try, on opening the Dialog (extends jface Dialog) I get an
Illegal Thread Access error.
So my question is: What Shell object to I need to give to the constructor
that this error will not come up?

Regards
Johannes
Re: New dialog in Job [message #443686 is a reply to message #443685] Wed, 29 September 2004 09:01 Go to previous messageGo to next message
Johannes Grob is currently offline Johannes GrobFriend
Messages: 11
Registered: July 2009
Junior Member
Oh, sorry about the name :( - It was Outlook's fault ;)


Eclipse wrote:

> Hi!

> I am desperatly trying to do the following:

> I need to display progress to the user, so I run a Job. During the Job
> however the user needs to be prompted for some information (which depends on
> stuff the Job did up to thst point).
> But whatever I try, on opening the Dialog (extends jface Dialog) I get an
> Illegal Thread Access error.
> So my question is: What Shell object to I need to give to the constructor
> that this error will not come up?

> Regards
> Johannes
Re: New dialog in Job [message #443688 is a reply to message #443686] Wed, 29 September 2004 09:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: l.heisterkamp.web.de

Hello,

same thing happens when opening a MessageDialog or sth. else...

Solution:

Display.getDefault().asyncExec(new Runnable(){
public void run() {
MessageDialog.openError(null, "Title", "Message");
}
});

See also:
http://help.eclipse.org/help30/index.jsp?
topic=/org.eclipse.platform.doc.isv/guide/swt_threading.htm

Regards,
LH

In article <cjdtlq$tdo$1@eclipse.org>, jgrob@globalware.ag says...
> Oh, sorry about the name :( - It was Outlook's fault ;)
>
>
> Eclipse wrote:
>
> > Hi!
>
> > I am desperatly trying to do the following:
>
> > I need to display progress to the user, so I run a Job. During the Job
> > however the user needs to be prompted for some information (which depends on
> > stuff the Job did up to thst point).
> > But whatever I try, on opening the Dialog (extends jface Dialog) I get an
> > Illegal Thread Access error.
> > So my question is: What Shell object to I need to give to the constructor
> > that this error will not come up?
>
> > Regards
> > Johannes
>
>
>
Re: New dialog in Job [message #443693 is a reply to message #443688] Wed, 29 September 2004 11:19 Go to previous message
Johannes Grob is currently offline Johannes GrobFriend
Messages: 11
Registered: July 2009
Junior Member
Though I needed to use syncExec on the
PlatformUI.getWorkbench().getDisplay() this worked perfectly.

Thanks a lot!

Johannes

"LH" <l.heisterkamp@web.de> schrieb im Newsbeitrag
news:MPG.1bc4a256f5872aa5989686@news.eclipse.org...
> Hello,
>
> same thing happens when opening a MessageDialog or sth. else...
>
> Solution:
>
> Display.getDefault().asyncExec(new Runnable(){
> public void run() {
> MessageDialog.openError(null, "Title", "Message");
> }
> });
>
> See also:
> http://help.eclipse.org/help30/index.jsp?
> topic=/org.eclipse.platform.doc.isv/guide/swt_threading.htm
>
> Regards,
> LH
>
> In article <cjdtlq$tdo$1@eclipse.org>, jgrob@globalware.ag says...
> > Oh, sorry about the name :( - It was Outlook's fault ;)
> >
> >
> > Eclipse wrote:
> >
> > > Hi!
> >
> > > I am desperatly trying to do the following:
> >
> > > I need to display progress to the user, so I run a Job. During the Job
> > > however the user needs to be prompted for some information (which
depends on
> > > stuff the Job did up to thst point).
> > > But whatever I try, on opening the Dialog (extends jface Dialog) I get
an
> > > Illegal Thread Access error.
> > > So my question is: What Shell object to I need to give to the
constructor
> > > that this error will not come up?
> >
> > > Regards
> > > Johannes
> >
> >
> >
Previous Topic:[SWT 2.1] Problem with ScrolledComposite
Next Topic:Loading PNG file with alpha channel
Goto Forum:
  


Current Time: Fri Apr 26 02:21:37 GMT 2024

Powered by FUDForum. Page generated in 0.02832 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top