Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » how to control the different view by input?
how to control the different view by input? [message #458748] Wed, 20 July 2005 15:49 Go to next message
Eclipse UserFriend
Originally posted by: kahon.sohu.com

hi,
I write a class,which has a Shell represents my main UI.It is like below:
---------------------Shell--------------------------|
|
---MenuBar-------- |
---Toolbar-------- |
|
|--------SashForm(main)-------------------------| |
| | |
Tree |SashFormright| |
| | |
|
|------------------------------------------------

then I want to change the sashForm(main)'s Tree by my input of one's
menubar's
input(a menuitem's click will brings front a Dialog which accept some
user's input),and render the different Tree in the SashForm(main).I have
write the dialog and receive user's input,like this: dialog.open()(returns
String[] represent user's input),then I use the result to render different
Tree,but it does raise a "widgt is disposed" Exception.
All above suggest the shell should like a Access Control List's access,and
I'm guesting the wrong is I don't understand the event listner
machalism,then who can give me a right method to design the Framework? Or
give me any suggestions.
Re: how to control the different view by input? [message #458783 is a reply to message #458748] Thu, 21 July 2005 10:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kahon.sohu.com

I write two class.One is my main swt standalone main class.It showes a top
level shell,children:MenuBar,ToolBar below,then a main SashForm which has
a child Tree part,a child Right SashForm.the right SashForm is on the
right,it has two vertical children:a table,a composite.

A menu item named login will open a loginDialog.I use the dialog to get
user's role and make decisions to show different view,that is the Main
SashForm's left part:Tree(the tree will decide the right part of the Main
SashForm). When I write in the dialog's onOkButton's SelectionListener's
method to dispose the tree,but it can't render the new tree when I later
new it(I use a UserID from the dialog input to decide the tree
view).what's the wrong?
It will also throw exception when I use the login dialog twice or more.the
main Shell will interrupt at the statement:

if (! display.readAndDispatch()) display.sleep();
Re: how to control the different view by input? [message #458784 is a reply to message #458748] Thu, 21 July 2005 10:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kahon.sohu.com

Please help me,thx.
I'm buzzling with the child shell communication with the parent shell.
Can u give me some advice?
Re: how to control the different view by input? [message #458894 is a reply to message #458748] Mon, 25 July 2005 18:41 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Once a widget is disposed then it cannot be used again (trying to do so will
cause a Widget is Disposed exception). It is not clear from your
description which disposed widget you are accessing, but my guess is that is
may be in the dialog that is shown and then destroyed when the user enters
some information. Your error stack trace should be helpful in indicating
the disposed widget that is being accessed.

Grant

"kahon" <kahon@sohu.com> wrote in message
news:662ce262720d72e7df861ab0ec92950e$1@www.eclipse.org...
> hi,
> I write a class,which has a Shell represents my main UI.It is like below:
> ---------------------Shell--------------------------|
> |
> ---MenuBar-------- |
> ---Toolbar-------- |
> |
> |--------SashForm(main)-------------------------| |
> | | |
> Tree |SashFormright| |
> | | |
> |
> |------------------------------------------------
>
> then I want to change the sashForm(main)'s Tree by my input of one's
> menubar's
> input(a menuitem's click will brings front a Dialog which accept some
> user's input),and render the different Tree in the SashForm(main).I have
> write the dialog and receive user's input,like this: dialog.open()(returns
> String[] represent user's input),then I use the result to render different
> Tree,but it does raise a "widgt is disposed" Exception.
> All above suggest the shell should like a Access Control List's access,and
> I'm guesting the wrong is I don't understand the event listner
> machalism,then who can give me a right method to design the Framework? Or
> give me any suggestions.
>
>
Previous Topic:jface ApplicationWindow
Next Topic:What libs need to be distributed with SWT/JFace apps?
Goto Forum:
  


Current Time: Tue May 07 21:30:19 GMT 2024

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

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

Back to the top