DCraig
New Member
Hi All,
I've come across a strange issue. I have a simple class i use as an enum called OrderType like so:
CLASS Entity.Order.Enums.OrderType:
DEFINE PUBLIC STATIC PROPERTY TestOrder AS CHARACTER NO-UNDO INIT "TESTORDER" GET.
END CLASS.
Which i use in code like so:
MESSAGE OrderType:TestOrder VIEW-AS ALERT-BOX.
I have also just added a new DB table called 'SalesOrder' with a field called 'OrderTypeCode'.
Since adding the DB table above, .p or .cls files that use the enum class above now receive the following compilation error:
- ** OrderType is ambiguous with SalesOrder.OrderTypeCode
I am lost as to how this is happening? Considering the Db field is called OrderTypeCode?? If the field was called OrderType i would understand. I should also note that no code changes have been made. All i did was add the new DB table.
It's also worth noting that if i fully qualify the path to the enum class then the code compiles. E.g. this works:
MESSAGE Entity.Order.Enums.OrderType:TestOrder VIEW-AS ALERT-BOX.
If anyone could shed some light on why this is, that would be fantastic!
Thanks
I've come across a strange issue. I have a simple class i use as an enum called OrderType like so:
CLASS Entity.Order.Enums.OrderType:
DEFINE PUBLIC STATIC PROPERTY TestOrder AS CHARACTER NO-UNDO INIT "TESTORDER" GET.
END CLASS.
Which i use in code like so:
MESSAGE OrderType:TestOrder VIEW-AS ALERT-BOX.
I have also just added a new DB table called 'SalesOrder' with a field called 'OrderTypeCode'.
Since adding the DB table above, .p or .cls files that use the enum class above now receive the following compilation error:
- ** OrderType is ambiguous with SalesOrder.OrderTypeCode
I am lost as to how this is happening? Considering the Db field is called OrderTypeCode?? If the field was called OrderType i would understand. I should also note that no code changes have been made. All i did was add the new DB table.
It's also worth noting that if i fully qualify the path to the enum class then the code compiles. E.g. this works:
MESSAGE Entity.Order.Enums.OrderType:TestOrder VIEW-AS ALERT-BOX.
If anyone could shed some light on why this is, that would be fantastic!
Thanks
Last edited: