Subclass method
BCS
ao at pathlink.com
Tue May 6 16:47:50 PDT 2008
Reply to June,
> BCS Wrote:
>
>> Reply to June,
>>
>>> I want to add a methd to an instance of dwt.widgets.Text.
>>>
>>> void setText(char[] name, char[] text){ name.setText(text);}
>>>
>>> there is ' setText(char[] text) ' in the base class
>>>
>>> each instance has a name. I cannot get this to work? the Tango book
>>> covers this very weakly
>>>
>> I'm not following what you want to do.
>>
>> Do you want to add methods to a class that inherits from
>> dwt.widgets.Text?
>>
> Yes
>
class MyClass : dwt.widgets.Text
{
void setText(char[] name, char[] text){ name.setText(text);}
}
does that work for what you want?
More information about the Digitalmars-d-learn
mailing list