Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Problem with adding more than two pages to a Wizard
Problem with adding more than two pages to a Wizard [message #452371] Fri, 18 March 2005 13:23 Go to next message
Eclipse UserFriend
Originally posted by: barryodriscoll.NOSPAMgmail.com

Hello everyone, I've run into a problem with adding more then two pages
to a wizard and no matter how much debugging I do I can't seem to figure
out what's going wrong. At the moment I get get my Wizard to work fine as
long as there are only two pages added to the Wizard, if I add a third
then that third one turns up blank no matter what. Here's the code I'm
using to add my pages:

public void addPages()
{
firstPage = new SelProjPage(workspace);
addPage(firstPage);

secondOldPage = new OldMTPage(workspace);
addPage(secondOldPage);
secondNewPage = new NewMTPage(workspace);
addPage(secondNewPage);

}

Here's the code I'm using to select which page is displayed next depending
on a radio button selection made in "firstPage":

public IWizardPage getNextPage()
{
RecordWizard recWiz = (RecordWizard)getWizard();
recWiz.projectTitle = projectList.getText();

if (newMT.getSelection()) {
NewMTPage page = recWiz.secondNewPage;
page.init(projectList.getText());
return page;
}
if (oldMT.getSelection()) {
OldMTPage page = recWiz.secondOldPage;
page.init(projectList.getText());
return page;
}
return null;
}

No matter what I seem to do the 3rd page added always comes up as a blank,
and it isn't putting an error msg into the .log and I can't see anything
going wrong in the debugger. If I swap which page is added 2nd and which
last then the 2nd one works fine. Very confusing situation any help or
suggestions would really be appricated.
Re: Problem with adding more than two pages to a Wizard [message #452374 is a reply to message #452371] Fri, 18 March 2005 14:22 Go to previous message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

Barry O'Driscoll wrote:
> Hello everyone, I've run into a problem with adding more then two pages
> to a wizard and no matter how much debugging I do I can't seem to figure
> out what's going wrong. At the moment I get get my Wizard to work fine
> as long as there are only two pages added to the Wizard, if I add a
> third then that third one turns up blank no matter what. Here's the
> code I'm using to add my pages:
>
> public void addPages()
> {
> firstPage = new SelProjPage(workspace);
> addPage(firstPage);
>
> secondOldPage = new OldMTPage(workspace);
> addPage(secondOldPage);
> secondNewPage = new NewMTPage(workspace);
> addPage(secondNewPage);
>
> }
>
> Here's the code I'm using to select which page is displayed next
> depending on a radio button selection made in "firstPage":
>
> public IWizardPage getNextPage()
> { RecordWizard recWiz = (RecordWizard)getWizard();
> recWiz.projectTitle = projectList.getText();
>
> if (newMT.getSelection()) {
> NewMTPage page = recWiz.secondNewPage;
> page.init(projectList.getText());
> return page;
> }
> if (oldMT.getSelection()) {
> OldMTPage page = recWiz.secondOldPage;
> page.init(projectList.getText());
> return page;
> }
> return null;
> }

Shouldnt that be if-else with no null?


>
> No matter what I seem to do the 3rd page added always comes up as a
> blank, and it isn't putting an error msg into the .log and I can't see
> anything going wrong in the debugger. If I swap which page is added 2nd
> and which last then the 2nd one works fine. Very confusing situation
> any help or suggestions would really be appricated.
>

maybe your selection buttons are not working properly.

CL
Previous Topic:Wizard dispalay problem
Next Topic:center an SWT filedialog
Goto Forum:
  


Current Time: Tue Nov 12 19:03:25 GMT 2019

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

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

Back to the top