Use new Enum functionality in built-in attributes/methods - OpenEdge Development - Products Enhancements - Progress Community

 OpenEdge Development

Use new Enum functionality in built-in attributes/methods

To make code more type-safe, it would be nice if existing built-in attributes/methods that currently only accept a constant or string get an overloaded version that accepts an Enum.

E.g.

BUFFER ttOrder:FILL-MODE = "MERGE":U

could become

BUFFER ttOrder:FILL-MODE = FillMode:Merge. /* Strongly typed */

or

BUFFER Order:FIND-BY-ROWID(orderRowId, NO-LOCK, NO-WAIT)

to

BUFFER Order:FIND-BY-ROWID(orderRowId, LockMode:NoLock, WaitMode:NoWait). /* Strongly typed */

Other examples could easily be added.

Comments
  • Another one that comes to mind are attaching event procedures. These strings are long and typing errors can be eliminated significantly with proper ENUM objects.