This is a spin off from my last question How does delphi convert ModalResult properties?
Since Delphi doesn't convert ModalResult properties, what's the best way for me to convert ModalResult properties to integers?
I don't really want:
If SpecialCase then
else if AnotherSpecialCase then
else BehaveNormally
So how do I convert values such as 'mrOk'
into 1
?
Note: I'm using
PropInfo := GetPropInfo(Instance, PropertyName);
SetPropValue(Instance, PropInfo, PropertyValue);
to set the property values.
Delphi 2007