Показать сообщение отдельно
Старый 26.03.2020, 17:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
a33ik: Extensible enum values are not deterministically assigned to a numerical value.
Источник: http://daxonline.org/1690-extensible...cal-value.html
==============

Warning: Assigning a numerical value to extensible enum 'Extensible Enumeration(EnumerationType)' will yield unexpected results. Extensible enum values are not deterministically assigned to a numerical value.

Warning: Comparing a numerical value with extensible enum 'Extensible Enumeration(EnumerationType)' will yield unexpected results. Extensible enum values are not deterministically assigned to a numerical value.



Same integer value for additional options to standard enumeration types (enumeration extensions) are not guaranteed across different environments.
Therefore you need to avoid comparing integers with extensible enums and using integer values in integrations as extended options may have different integer value in several environments (if there are two solutions, which extend same enumeration type).


However FormComboBoxControl.selection() methods returns int eventhough control on the form is based on the specific enum type.
You can use enum2int global function to convert enum value to int (suppress warning in this case):
FormComboBoxControl.selection() == enum2int(EnumType::EnumOption)
Or convert value to enum:
EnumType enumVar = any2enum(currencyFilter.selection());




Источник: http://daxonline.org/1690-extensible...cal-value.html