[Mono-list] SPAM-LOW: Re: Inheriting from System.Windows.Forms.TextBox

Ivan N. Zlatev contact at i-nz.net
Thu Nov 20 15:39:48 EST 2008


On Thu, Nov 20, 2008 at 7:08 PM, Charlie Poole <charlie at nunit.com> wrote:
> Hi
>
>> On Thu, Nov 20, 2008 at 4:47 PM, Jb Evain <jb at nurv.fr> wrote:
>> > Hey,
>> >
>> > On 11/20/08, Jon Harrop <jon at ffconsultancy.com> wrote:
>> >  >  Any ideas why?
>> >
>> > It looks like a F# compiler bug to me.
>> >
>>
>> Just for info the the method is defined in the TextBoxBase:
>>
>>    internal abstract Color ChangeBackColor (Color backColor);
>>
>> and implemented in the TextBox class:
>>
>>    internal override Color ChangeBackColor (Color backColor) { ... }
>
> It also seems to be a design bug. What's the point of having
> a public abstract class if it's written in such a way that you
> can only extend it internally?
>

Hi,

It's definitely not a design bug, but quite the opposite.
TextBox(Base) is part of the Windows Forms API, which is part of the
.NET Class Library, which we have to be API compatible with. However
the public API covers only so much functionality and there is so much
more that happens behind the scenes, which requires a lot of internal
code implemented, which is implemented in a nice OO manner.

-- 
Kind Regards,
Ivan N. Zlatev


More information about the Mono-list mailing list