Problem with adding more than two pages to a Wizard [message #452371] |
Fri, 18 March 2005 13:23 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02584 seconds