I have recently taken over a c# project that uses IronPython 1.1. I am looking 
to update the IronPython implementation to 2.7 but having some issues as the 
api has changed dramatically. The big issue I am having at the moment is 
finding a replacement for the createMethod() function. 

The c# code looks like:
        public static TDelegate SetupDelegate<TDelegate>(string code, 
IList<string> args) {
            try {
                return interpreter.CreateMethod<TDelegate>(code, args);
            } catch (Exception) {
                log.WarnFormat("Failed to compile delegate code:\n{0}", code);
                throw;
            }
        }

interpreter was a PythonEngine variable, but I have changed it to a 
ScriptEngine with the new 2.7 implementation. 

If it helps at all, this system is used to create delegates for event handlers. 
There may be some code written to be activated when a button is clicked, which 
is passed into this function here then the method is created and returned and 
added to the list of event handlers.

I have tried for a day and a half trying to get some code that worked, but 
can't seem to get anything that works.

Any help is greatly appreciated.
Thanks,
Andrew.
                                                                                
  
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to