Getting access to the variables of an imported class

aalm a at a.a
Sat Dec 5 20:40:23 PST 2009


jicman Wrote:

> 
> However, when I "uncomment" the this line, //d.Name.text = "name";, 
> 
> import dfl.all;
> import myform2;
> 
> void main()
> {
>   Form d = new MyForm();
>   d.text = "Hello...";
>   d.Name.text = "name";
>   d.show();
> }
> 

I dont have DFL installed, but try this:

import dfl.all;
import myform2;
 
void main()
{
  //Form d = new MyForm();
  //MyForm d = new MyForm();
  auto d = new MyForm();
  d.text = "Hello...";
  d.Name.text = "name";
  d.show();
}


More information about the Digitalmars-d-learn mailing list