In Xojo if you define a class and add a constant you can refer to that constant like
// suppose class1.kConstant is a string constant dim v as string = Class1.kConstant
Basically you can refer to the Class type and access the constant.
Or you can do
// suppose class1.kConstant is a string constant dim c as new Class1 dim v as string = c.kConstant
and refer to the constant NOT by referring to the class but to an instance of that class
Enums dont work that way at all. You can ONLY refer to the enum by referring to the Class type – not an instance. For example
// suppose class1.MyEnum is an enum with a value named EnumValue1 dim v as class1.MyEnum = Class1.MyEnum.EnumValue1
This works. What wont work is
// suppose class1.MyEnum is an enum with a value named EnumValue1 cim c as new Class1 dim v as class1.MyEnum = c.MyEnum.EnumValue1
You cannot refer to an enum through an instance – you MUST use the class type.
This seems inconsistent between these two very similar types of entities in Xojo.
Curiously this inability to refer to an enum through an instance is what causes this weird seeming bug
I filed a bug report but it was closed within an hour.
I made a feature request to make Constants and Enumerations behave same in this regard