• Advertisement
Sign in to follow this  

[.net] CodeDom / BooCompiler and object instances.

This topic is 3974 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a way to pass an instance of an object to either CodeDom or BooCompiler so that scripts can work with a particular instance of an object? For example, if the class I'm parsing the script in has a property called Name, how can I access that property for that particular instance within the script? I'm looking for something similar to Qt's QSA setup where I can add a pointer to a QObject to the interpreter and it would essentially make it a global variable with the same name as the object. void QSInterpreter::addTransientObject ( QObject * object )
Some Clarification I know I could pass an instance of the class I want to expose to the class / function I want to access it but one of my reasons for choosing Boo is that objects are not required. I would like the script to possible be as simple as.
SomeClassInstance.DoSomething("Doing it with scripts is better!")
I'd like to keep things as simple as possible for end users and would like to avoid them having to create a public static method within a class just to call a function or display something. [Edited by - tstrimp on March 6, 2007 1:49:33 PM]

Share this post


Link to post
Share on other sites
Advertisement
Looks like I can use InteractiveInterpreter's SetValue method for Boo. Anyone know of a similar system within CodeDom?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement