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.
Summary: | InstantiatingIterator.initialize not called when using WizardDescriptor default constructor | ||
---|---|---|---|
Product: | platform | Reporter: | Jesse Glick <jglick> |
Component: | Dialogs&Wizards | Assignee: | Stanislav Aubrecht <saubrecht> |
Status: | REOPENED --- | ||
Severity: | blocker | ||
Priority: | P4 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 154375 | ||
Bug Blocks: | 102261 |
Description
Jesse Glick
2008-11-21 21:42:40 UTC
Makes it not obvious how to use the recommended (warning-free) style of wizard construction as in issue #102261. Just class W extends WizardDescriptor { W() { setPanelsAndSettings(new I(), this); } } class I implements WizardDescriptor.Iterator<W> { W w; public void initialize(WizardDescriptor w) {this.w = (W) w;} public void uninitialize(WizardDescriptor w) {this.w = null;} } does not work; initialize is never called and the field is left null. You need to do class W extends WizardDescriptor { W() { setPanelsAndSettings(new I(this), this); } } class I implements WizardDescriptor.Iterator<W> { W w; I(W w) {this.w = w;} public void initialize(WizardDescriptor w) {} public void uninitialize(WizardDescriptor w) {} } which is fine (and means one less cast) but means that the initialize/uninitialize methods become useless, which is potentially confusing. 2055bdcb4db3 Integrated into 'main-golden', will be available in build *200812030201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/2055bdcb4db3 User: Jiri Rechtacek <jrechtacek@netbeans.org> Log: #153672: InstantiatingIterator.initialize not called when using WizardDescriptor default constructor Rollback due to issue 154375 |