Inconsistency in field naming rules - Forum - OpenEdge Development - Progress Community

Inconsistency in field naming rules


Inconsistency in field naming rules

  • > On Apr 20, 2016, at 7:01 AM, wrote:


    > there is no technical reason to impose same restrictions as for static syntax (the prove is this just works)

    sorry i was not being clear. let me try again.

    what i meant to say is that the rules for static and dynamic should be the same and static ought to be changed to match the dynamic ones. The dynamic ones work because the names are in quotes. But Laura is the compiler expert and it is not for me to say how hard or practical such a change would be.

  • The one thing I just found that does not work is using our special bufHandle::<field-name> syntax to get the value of the field for a dynamic temp-table.  E.g.:




    tt:ADD-NEW-FIELD("foo()", "Integer").




    MESSAGE bhdl::foo() VIEW-AS ALERT-BOX. /* You get a runtime error: BUFFER-FIELD foo was not found */

    If I had made the name "foo(s)", that last line (with bhdl::foo(s)) will not even compile.

  • Indeed Laura,

    we’re aware of this ‘limitation’ but I for one am not bothered by this ‘inconsistency’… there are a few things different when working dynamically compared to the static approach so I don’t see why having consistent naming rules between them is considered such a big deal.

    I don’t have any interest in making a feature request for neither support for:
    - function alike fields in short notation field access: ttHandle::functionField()
    - function alike fields in static temp table definition: def temp-table tt field “functionField()” as char.

    If any of those can be implemented might be of interest for others, will certainly not bother me, my only concern is imposing naming restriction on dynamic temp-table fields just to fix this inconsistency. If the bug description is something like "using parentheses (or keywords) in field names on temp-table definition should be supported as for dynamic temp-table” then I have no problem with it (not interested in having it fix either though), if you make it sound more like “using parentheses (or keywords) in field name on add-new-field method of temp-table should throw error” then I just hope it will never get higher on your todo list :(
    Marian Edu

    Acorn IT 
    +40 740 036 212

  • Keywords like "character" ARE allowed - even in a statically defined table - much to my surprise!

  • Laura Stern
    Keywords like "character" ARE allowed - even in a statically defined table - much to my surprise!

    Unfortunately "transaction" is not a legal TT field name, and that led to some inconsistent TT field names. :(