reuse the jface Wizard instance? [message #439735] |
Thu, 15 July 2004 05:14  |
Eclipse User |
|
|
|
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 13:03  |
Eclipse User |
|
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.18667 seconds