This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 30208 - incorrect order of calls on WizardDescriptor.Panel
Summary: incorrect order of calls on WizardDescriptor.Panel
Status: VERIFIED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Dialogs&Wizards (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-17 15:12 UTC by David Konecny
Modified: 2008-12-22 23:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ide.log (8.06 KB, text/plain)
2003-01-17 15:13 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2003-01-17 15:12:26 UTC
Dafe told me that he was told that correct order
of calls on WizardDescriptor.Panel is:

1.) getComponent()
2.) readSettings()

Based on this information he wrote and provided
example on how to write correctly the wizard
panel. See
<http://performance.netbeans.org/howto/dialogs/wizard-panels.html>
document and linked example
<http://www.netbeans.org/source/browse/core/src/org/netbeans/core/ui/IDESettingsWizardPanel.java?rev=1.1&content-type=text/x-cvsweb-markup>.
If the order is not as stated the NPE is thrown
from readSettings() method because panelUI was not
initialized yet. 

And this is what I experience. See attached
exception for more details. Relevant excerpts are:

1.) when property change listener is attached to
WD the WD.updateState is called which in turn
calls readSettings before getComponent:
org.openide.WizardDescriptor.updateState(WizardDescriptor.java:461)
org.openide.WizardDescriptor.initialize(WizardDescriptor.java:275)
org.openide.NotifyDescriptor.getterCalled(NotifyDescriptor.java:197)
org.openide.NotifyDescriptor.addPropertyChangeListener(NotifyDescriptor.java:511)

Just attaching listener should not initialize the
whole wizard panel.

2.) when next button is pressed on WD the
WD.updateState is called and result is the same:

org.openide.WizardDescriptor.updateState(WizardDescriptor.java:461)
org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:992)

Please either fix this bug or tell us that the
order is not guaranteed. In both cases please
clarify the order in JavaDoc.
Comment 1 David Konecny 2003-01-17 15:13:42 UTC
Created attachment 8612 [details]
ide.log
Comment 2 Jiri Rechtacek 2003-01-21 16:14:10 UTC
Order of calls won't be specified now. This requirement was added in
issue 26552 (e.g. the central point for designing new Wizard API).
Dafe will repair the example to won't give a wrong guide. I close as
wontfix.
Comment 3 David Konecny 2003-07-08 15:44:02 UTC
.