Sign in to follow this  

Making your code a script's referenced assembly

This topic is 3862 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

Alrighty, I've been messing with CodeDom lately and it looks to be very promising for scripting. Here is my problem: script file
using System;
using System.Windows.Forms;
using DomTest; //The namespace where class script should be...

class test
{
	public static script init()
	{
	        script data = new script(); 
		data.x = -1; 
		return data; 
	} 
}
Now, Whenever I try to invoke init I get an exception. Currently I am trying to pass the script the reference which it needs by this method, also I am using C++/CLI to maintain inter language capabilities. (compilerparamters^) params->ReferencedAssemblies->Add( "DomTest.script" ); //I figure this string here is the issue. the script class is defined as:
namespace DomTest
{
    ref class script
    {
    public: 
	int x; 
    };
}
I can give the code access to 'official' namespaces like System by params->ReferencedAssemblies->Add( "System.dll" ); However, my code is in an exe (although, since I am making a library, it will be released as a .lib) So, how can I give the script file access to datatypes defined in my code?

Share this post


Link to post
Share on other sites

This topic is 3862 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this