[IronPython] overriding methods from C# classes

2010-07-09 Thread Marcin Krol
Hello Michael and everyone, Michael Foord wrote: I recommend using the Visual Studio C# designer and then subclass the classes it generates from IronPython. I set out to do just that and stumbled upon a problem: I generated Windows form in C#, compiled into assembly (ip_cl1), copied to

Re: [IronPython] overriding methods from C# classes

2010-07-09 Thread Dino Viehland
Marcin wrote: Hello Michael and everyone, Michael Foord wrote: I recommend using the Visual Studio C# designer and then subclass the classes it generates from IronPython. I set out to do just that and stumbled upon a problem: I generated Windows form in C#, compiled into assembly

Re: [IronPython] overriding methods from C# classes

2010-07-09 Thread Marcin Krol
Dino Viehland wrote: Is there some way of simply overriding methods in Python so that they do get called by form events? In both of these cases there are no methods to be overridden. You're just defining methods which you want to use for the event handlers. You need to connect those methods

Re: [IronPython] overriding methods from C# classes

2010-07-09 Thread Curt Hagenlocher
On Fri, Jul 9, 2010 at 10:43 AM, Marcin Krol mrk...@gmail.com wrote: Bc when I changed declaration of the method to protected virtual in the Form1.cs, the inherited class calls my Ipython method all right - that looks like overriding to me, at least when looking at it from the outside and not

Re: [IronPython] overriding methods from C# classes

2010-07-09 Thread Dino Viehland
Marcin wrote: Dino Viehland wrote: Is there some way of simply overriding methods in Python so that they do get called by form events? In both of these cases there are no methods to be overridden. You're just defining methods which you want to use for the event handlers. You need to

Re: [IronPython] overriding methods from C# classes

2010-07-09 Thread Marcin Krol
Thanks for replies, Dino! Dino Viehland wrote: 1. when IPY 2.7 is to be released? Our current plan is around the end of this year. That's a pity, I need to get rolling with this relatively soon. 2. Documentation. This sort of worries me: where do I get the detailed info how to use this

Re: [IronPython] overriding methods from C# classes

2010-07-09 Thread Marcin Krol
Curt Hagenlocher wrote: Yes. It's universally true in the CLR that you can't override a function in a derived class unless the function was marked as virtual in the base class. IronPython is no different than C# in this regard. One thing that would be *nice* for C# noobs like me would be

Re: [IronPython] overriding methods from C# classes

2010-07-09 Thread Lukas Cenovsky
On 9.7.2010 19:17, Dino Viehland wrote: This is one of the reasons why I suggest WPF over WinForms. In WPF you can declare the event handlers in the XAML and we can wire them up to you. In our IronPython 2.7 source code I recently added a clr.LoadComponent method which does this. So for WPF

Re: [IronPython] overriding methods from C# classes

2010-07-09 Thread Dino Viehland
Marcin wrote: Curt Hagenlocher wrote: Yes. It's universally true in the CLR that you can't override a function in a derived class unless the function was marked as virtual in the base class. IronPython is no different than C# in this regard. One thing that would be *nice* for C# noobs