[IronPython] .NET Events in IronPython
Martin Maly
Martin.Maly at microsoft.com
Tue Nov 15 20:09:59 CET 2005
Either that (which I don't like very much the idea of adding keywords as it modifies the underlying language), or finding some way to express that the class I am deriving from .NET class should be sealed. That should get us there also, even though the code to do events would probably not be as slick as it is in C#.
Martin
________________________________
From: Keith J. Farmer [mailto:users-bounces at lists.ironpython.com] On Behalf Of Keith J. Farmer
Sent: Monday, November 14, 2005 6:00 PM
To: Discussion of IronPython
Subject: RE: [IronPython] .NET Events in IronPython
You'd need to add an event keyword, or some other marker, wouldn't you? Otherwise you don't know that it should be an event rather than some other property.
________________________________
From: users-bounces at lists.ironpython.com on behalf of Martin Maly
Sent: Mon 11/14/2005 5:23 PM
To: Discussion of IronPython
Subject: Re: [IronPython] .NET Events in IronPython
After playing with this for a bit, I think that at the moment IronPython is not capable of what you can do below in C#. The insurmountable (for now, I hope) obsctacle that I hit is that the events must be sealed classes, inherited from an abstract MulticastDelegate. IronPython doesn't know of this rule and for now doesn't generate sealed class and the IronPython code that attempts to mimic the output of C# compiler throws exception "delegate must be a sealed class".
I think that as we improve the 'static compiler' story, we may need to support creating sealed classes. For now, the scenario below is broken...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20051115/29350d1f/attachment.html>
More information about the Ironpython-users
mailing list