Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » reuse the jface Wizard instance?
reuse the jface Wizard instance? [message #439735] Thu, 15 July 2004 09:14 Go to next message
Eclipse UserFriend
Originally posted by: albert_tan.operamail.com

Hi All,

Is it possible to reuse the jface Wizard object?

I have to invoke the same wizards many places/ many
times in my application, So is it possible to use back the same instance
of the wizard in other places. Seems when I finish/Cancel my wizard, it's
internally disposing it's pages & container so i have to re-create a new
instance.

see my sample usage below:

OpenProjectWizard wiz = new OpenProjectWizard();
wiz.init(site.getWorkbenchWindow().getWorkbench(), null);

WizardDialog dialog = new WizardDialog(shell, wiz);

dialog.open(); // Invoke First time
// get values

dialog.open(); // Invoke Second time

// get values

dialog.open(); // Invoke third time
// get values

what happened is, when I invoked the second/ third time the wizard
did got invoked but ALL the operations disabled except CANCEL.

is this the normal behaviour?

thanks for any help.

thanks
Albert
Re: reuse the jface Wizard instance? [message #440217 is a reply to message #439735] Mon, 26 July 2004 17:03 Go to previous message
Paul E. Keyser is currently offline Paul E. KeyserFriend
Messages: 878
Registered: July 2009
Senior Member
DDT

JFace Wizards need to be recreated every time, as I know by having tried
what you did and gotten unpleasant results. I believe I saw the same
thing said in the docs, but don't recallwhere just now.

Paul

Albert wrote:
> Hi All,
>
> Is it possible to reuse the jface Wizard object?
>
> I have to invoke the same wizards many places/ many
> times in my application, So is it possible to use back the same instance
> of the wizard in other places. Seems when I finish/Cancel my wizard, it's
> internally disposing it's pages & container so i have to re-create a new
> instance.
>
> see my sample usage below:
>
> OpenProjectWizard wiz = new OpenProjectWizard();
> wiz.init(site.getWorkbenchWindow().getWorkbench(), null);
>
> WizardDialog dialog = new WizardDialog(shell, wiz);
>
> dialog.open(); // Invoke First time
> // get values
>
> dialog.open(); // Invoke Second time
>
> // get values
>
> dialog.open(); // Invoke third time
> // get values
>
> what happened is, when I invoked the second/ third time the wizard
> did got invoked but ALL the operations disabled except CANCEL.
>
> is this the normal behaviour?
>
> thanks for any help.
>
> thanks
> Albert
>
>
Previous Topic:how-to dynamically change tab position SWT.TOP SWT.BOTTOM
Next Topic:Where are tasks data stored?
Goto Forum:
  


Current Time: Fri Apr 26 07:42:43 GMT 2024

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

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

Back to the top