[IronPython] Ironpython delegates never get called
curt at hagenlocher.org
Fri Apr 30 16:32:21 CEST 2010
How is the Master object you create from Python shared back with the C#
code? (I'm assuming that the event is being triggered from C#.) How did you
check to see that the events were processed? Does the event-triggering code
On Fri, Apr 30, 2010 at 7:00 AM, jon vs. python <jonvspython at gmail.com>wrote:
> 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.
> Users mailing list
> Users at lists.ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users