#892 ooDialog - addAttribute has bug

ooDialog.4.2.0
closed
ooDialog (58)
5
2012-08-27
2010-03-12
No

ooDialog has a feature where, for each control in a dialog, an attribute is added to the Rexx dialog object to reflect the 'value' of the dialog control.

In most cases, the attribute name is automaticaly generated, sometimes supplied by the programmer. In either case, the implementing code has checks to ensure that the new attribute name is a valid method name and not a duplicate of an existing method in the object. If so an alternative name is automatically generated.

The code to do the checks is flawed as the attached program demonstrates. In this code snippet each of the check box controls will have a generated attribute name that is an existing method name of the dialog object: copy, defaultName, and class. For all 3 check boxes, the alternative name should be generated. But, as the example program shows, this does not work correctly for the "copy" and "default name" check boxes.

self~addCheckBox(IDC_CHK_COPY, , 10, 10, 80, 12, "&Copy", "GROUP")
self~addCheckBox(IDC_CHK_DEFAULTNAME, , 10, 27, 80, 12, "Default name")
self~addCheckBox(IDC_CHK_CLASS, , 10, 45, 80, 12, "Class")

The bug is in all versions of ooRexx.

Discussion

  • Mark Miesfeld

    Mark Miesfeld - 2010-03-12

    Example program showing bug

     
  • Mark Miesfeld

    Mark Miesfeld - 2010-03-13

    Comitted revision 5692.

    This is in trunk only. I don't think I'm going to put it in 4.0.1

     
  • Mark Miesfeld

    Mark Miesfeld - 2010-09-08

    This fix will be in the next major release of ooDialog, but not in the ooRexx 4.1.0 release.

     
  • Mark Miesfeld

    Mark Miesfeld - 2012-02-03

    This fix will appear in the next major release of ooDialog, it will not be included in an ooRexx bug fix release

     

Anonymous
Anonymous

Cancel  Add attachments