Subclass method -distorted now put again
kb3ctd2 at yahoo.com
Wed May 7 12:17:34 PDT 2008
"BCS" <BCS at pathlink.com> wrote in message
news:fvsdh5$2hii$11 at digitalmars.com...
> so "setText("speaker", "foo") would call speaker.setText("foo")?
> D doesn't support this directly, however you could do it manually
> void setText(char name, char text)
> case "speaker": speaker.setText(text); break;
> case "radio": radio.setText(text); break;
> default: assert(false);
In this case, it seems like keeping the controls in an AA would make a lot
controls["speaker"] = new Slider();
controls["radio"] = new Button();
void setText(char name, char text)
More information about the Digitalmars-d-learn