[IronPython] Ironpython delegates never get called

jon vs. python jonvspython at gmail.com
Fri Apr 30 16:00:04 CEST 2010

I've a couple of events in a C# assembly...

public class Master
        public delegate void            ResponseData(int id, byte function,
byte[] data);
        public event    ResponseData    OnResponseData;
        public delegate void            ExceptionData(int id, byte function,
byte exception);
        public event    ExceptionData   OnException;

...that I subscribe from IronPython...

import clr
from MyModule import Master
from System import Array
from System import Byte

def response(i, f, data):
    print "Protocol response received"

def exception(i, f, e):
    print "Protocol exception received"

class myMaster(object):
    def __init__(self, ip, port):
        self.mst = Master()
        self.mst.OnResponseData += response
        self.mst.OnException += exception

...but never get called back. I've already check that the events get
processed. Function signatures seem to be ok too. Am I missing something?
How can I trace what's going on?
Thanks, Jon.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100430/6042191c/attachment.html>

More information about the Ironpython-users mailing list