Subclass method
June
somewhere at so.com
Tue May 6 21:28:44 PDT 2008
BCS Wrote:
> 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?
>
>
Not really -This produces an interface with Text no?
I just want an extra method to change multiple, named , instances , one at a time by name
setText(name,text)
More information about the Digitalmars-d-learn
mailing list