You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support overriding protected virtual methods of a .NET class in Python #2192
If OnUseNumber was public virtual, then this could probably be fixed by adding a __namespace__ attribute to the Python class, as in #567 (comment).
However, based on this discussion, overriding protected virtual methods is not currently supported. I think this is because of the use of the zero-argument form of GetMethodshere, which only returns public methods.
This particularly affects Winforms, which has a lot of protected virtual methods.
Activity
mhsmith commentedon Jul 11, 2023
If
OnUseNumberwaspublic virtual, then this could probably be fixed by adding a__namespace__attribute to the Python class, as in #567 (comment).However, based on this discussion, overriding
protected virtualmethods is not currently supported. I think this is because of the use of the zero-argument form ofGetMethodshere, which only returns public methods.This particularly affects Winforms, which has a lot of
protected virtualmethods.WndProc()method onFormcontrol in WinForms is never getting called #2536 as a duplicate of this issue