Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping to incorrect enum #66

Open
quinn-at-ihsmarkit opened this issue Oct 22, 2020 · 0 comments
Open

Mapping to incorrect enum #66

quinn-at-ihsmarkit opened this issue Oct 22, 2020 · 0 comments

Comments

@quinn-at-ihsmarkit
Copy link

quinn-at-ihsmarkit commented Oct 22, 2020

When I include a custom control in another control, each using a different enum in a CalcBinding, the first enum tag to name mapping gets overwritten with the second.
This new value is then passed to DynamicExpresso and the string parsing fails with an exception.
Please see the attached code for a demonstration.

  • In the main window, it isn't able to decipher the PressureSource value because it tries to look it up against the FlowPath enum.
    DynamicExpresso.Exceptions.ParseException
    HResult=0x80131500
    Message=No property or field 'eForecastPressureMethod_Wellhead' exists in type 'FlowpathType' (at index 12).
    Source=DynamicExpresso.Core
    StackTrace:
    at DynamicExpresso.Parsing.Parser.GeneratePropertyOrFieldExpression(Type type, Expression instance, Int32 errorPos, String propertyOrFieldName)
    WpfXamlPlayground.zip
ajphall added a commit to ajphall/CalcBinding that referenced this issue Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant