Getting access to the variables of an imported class

jicman cabrera_ at _wrc.xerox.com
Sat Dec 5 20:58:38 PST 2009


aalm Wrote:

> 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();
> }

thanks.  That worked.  Would you care to explain? :-)  I know what auto does, but I thought that a Form was a form and a Class was a class.  Does auto here would suffice for all other kinds of variables?

Thanks for the help.

josé



More information about the Digitalmars-d-learn mailing list