Retrieval of new values for parameters

Oct 28, 2010 at 12:55 PM

hello

i was playing around with Jint and so far I am very fascinated by it. I found only one minor drawback.

  • I need to expose certain parameters to script (up to 50 variables)
  • Script can change their values
  • I can't use return statement, since there is more than one variable

So I added a small function to JintEngine:

public object GetParameter(string name) {
   return visitor.GlobalScope[name];
}

This method retrieves the new (changed) value for the parameter. I couldn't find any existing method that would allow me to do this.

If this code doesn't break your design, could you please add it to main code branch?

 

thank you