Profile Picture

ConstructorArgument default ignored when ConstructorArgumentType is Enum

Posted By davidS 8 Years Ago

ConstructorArgument default ignored when ConstructorArgumentType is...

Message
Posted Friday February 27 2009
The RE GUI (build 382) seems to ignore the specified default value of ConstructorArgument when the ConstructorArgumentType is Enum. Instead it always displays the second enumeration.

For example, the following displays No as the default when the GUI is displayed:
public enum YesNoType { Yes, No };
[ConstructorArgument("RTH reset", ConstructorArgumentType.Enum, YesNoType.Yes, 1)]

Switching the order of enumeration definition displays Yes as the default when the GUI is displayed:
public enum YesNoType { No, Yes };
[ConstructorArgument("RTH reset", ConstructorArgumentType.Enum, YesNoType.Yes, 1)]

I've verified similar behavior with indicator code that I downloaded from the RE library. Even with many enumerations, the second always seems to get displayed as default.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems