Affects Version/s: None
Fix Version/s: 0.7
Number of attachments :
Make it easier to run the boo interpreter from a regular boo or C# script by letting the caller provide an outside object that is used for name resolution lookups (via system.reflection).
Perhaps make an overload of interpreter.Eval that accepts an object to be used for name lookups if the regular lookups fail.
Or maybe create an "AddScope(instance as object)" method so that multiple outside objects can be used for name lookups.
Or else use events or virtual methods to let us hook into the boo interpreter:
mytype as Type
instance = inst
mytype = inst.GetType()
override def Lookup(name as string): //not possible
interpreter = LocalInterpreter(self)
result = interpreter.Eval(formatstring)
return result.ToString() if len(result.Errors) == 0
I don't know the best solution.