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

Evaluate returns false and doesn't set property value #43

Open
gbanusi opened this issue Sep 17, 2018 · 1 comment
Open

Evaluate returns false and doesn't set property value #43

gbanusi opened this issue Sep 17, 2018 · 1 comment

Comments

@gbanusi
Copy link

gbanusi commented Sep 17, 2018

I'm trying to execute this:

IDynamicExpression eDynamic = engineContext.CompileDynamic("Object.Width = 0.20");
var res = eDynamic.Evaluate();
,

but for some reason, "res" is false and evaluation doesn't set anything.
Is setting variable property value allowed?

@gbanusi gbanusi changed the title Setter return false but doesn't set the value Evaluate returns false and doesn't set property value Sep 17, 2018
@Doc-Saintly
Copy link

The "=" is used as an Equality Comparison operator (==) to support expressions that use this by default. You could try to override the operator (see #54 for an example).

So by default it will return false if you're trying to set it to a new value, because it sees it as: OldValue == NewValue which is most likely false.

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

2 participants