Getting properties of class - Forum - OpenEdge Development - Progress Community
 Forum

Getting properties of class

  • Are you doing both?

     

    Yes.

    In any case, I would rather solve it with a generator than dynamic code.

    Seems like overkill to me. Most enums have a hand full of values.

  • I agree, a generator is the way to do this. At the moment, I don't

    allow free-form entry of values that are part of an enum, so access is

    only by combo-box / selection list etc so the user can only choose a

    valid value .

    Julian

    On 16 March 2010 22:00, Thomas Mercer-Hursh

  • Admittedly not a major labor saver, but it certainly takes less time to provide the list of values and press a button than it does to type all the options.

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • Depends on your level of trust.

    I.e,

    MyClass:EnumProperty = MyEnum.SomeValue

    is very safe, but

    MyClass.EnumProperty = something from a combo box which I am presuming was populated with the possible enum values

    is less safe.

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • True. That's why there is a validator method.

    Julian

    On 16 March 2010 22:21, Thomas Mercer-Hursh