[Mono-winforms-list] Bug in System.Windows.Forms.Control:get_ContainsFocus ()?

2006-06-21 Thread Paddy Joy
Hi, I'm porting an application from MS. NET to Mono and I have encountered the following, maybe it's a bug or maybe it's just bad coding :-) The attached code sends Mono into a loop until it eventually crashes with a segmentation error (When button1 is clicked). Should I report this as a

Re: [Mono-winforms-list] Bug in System.Windows.Forms.Control:get_ContainsFocus ()?

2006-06-21 Thread PFJ
Hi, So do you think it could be a bug with resolving the base class? It seems from the trace that it is going into a continuous loop, like it is calling ContainsFocus on itself. To be honest, all I saw was the segfault rather than the tonnes of output. The baseclass seems to be working fine

Re: [Mono-winforms-list] Bug in System.Windows.Forms.Control:get_ContainsFocus ()?

2006-06-21 Thread Paddy Joy
How about this code, I'm pretty sure that it instantiates button2 correctly now but still gives the segmentation error. I have declared the button with: private testbutton button2; and instantiated it with: this.button2 = new testbutton(); Thanks for the help, Paddy using System; using

Re: [Mono-winforms-list] Bug in System.Windows.Forms.Control:get_ContainsFocus ()?

2006-06-21 Thread Rafael Teixeira
Hi Paddy, Why do you return base.ContainFocus instead of base.Focused from your overriden Focused? That way you are introducing infinite recursion as Control.ContainsFocus calls Control.Focused, that in your case is overriden. In truth, unless this is just some small code to show the problem, I

Re: [Mono-winforms-list] Bug in System.Windows.Forms.Control:get_ContainsFocus ()?

2006-06-21 Thread Paddy Joy
Hi Rafael, Yes this problem exists in a much larger application involving lots of custom controls, I have just created this code to demonstrate the problem as simply as possible. I have tested the code in MS .NET and it works ok and returns False to the console as expected so I have logged a