Menu

#381 ooDialog - remove distinction between old and 'new' controls

ooDialog.4.2.0
closed
ooDialog (102)
5
2012-08-27
2009-09-30
No

The distinction between the old controls and the 'new' controls in ooDialog is an artificial that should be removed.

By putting some control methods in a separate AdvancedControls class, the user is currently forced to inherit that class in their subclasses. All of the methods in the AvancedControl class really belonged in already existing classes. If the methods were moved to some already existing classes, where they belong, there would be no need to inherit AdvancedControls. You could just inherit the type of dialog you are creating, UserDialog, ResDialog, CategoryDialog, etc..

AdvancedControls would be left as a deprecated empty class. All existing dialogs that inherit AdvancedControls would just work the same, so there are no backwards compatibility issues.

There are / were 3 basic types of methods in AdvancedControls:

1.) Methods to place a control in the in-memory dialog template. These belonged in the existing DynamicDialog class that already had the methods for working with the in-memory dialog template. These methods would be moved to DynamicDialog.

2.) Methods to create an attribute in the dialog object to represent a control and connect the control with the attribute. Methods to do that for check boxes, radio buttons, edit controls, list boxes, combo boxes, and more, already existed in PlainBaseDialog. So the methods to do the same thing for the 4 'new' controls, List-view, tree-view, track bar, and tab should have been placed alongside the existing methods. These 4 methods in AdvancedControls would be moved to PlainBaseDialog.

3.) Methods to get a new control object. Those methods, I think, really should have just been placed in BaseDialog. All non-trivial dialogs are subclasses of BaseDialog. These methods would be moved to BaseDialog.

Discussion

Anonymous
Anonymous

Add attachments
Cancel