Menu

#3 Crash if no delegate declared in VB.NET

open
nobody
None
5
2012-12-23
2006-06-27
Anonymous
No

If you declare an event in VB.NET without declaring a
delegate type, as in the following:

Public Event MyEvent(ByVal arg1 as Double)

and then you attach a handler to it in Python, Python
will crash when the handler is invoked.

The workaround is to declare a delegate type:

Public Delegate Sub MyEventType(ByVal arg1 as Double)
Public Event MyEvent as MyEventType

which works fine.

Kevin Atkinson
kevin.atkinson@gmail.com

P.S. Thanks for all the tremendous work you've done on
Pythonnet.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.