[Gambas-user] Direct assignment to arrays of inherited classes does not work

Benoît Minisini gambas at ...1...
Mon Sep 22 18:21:25 CEST 2014


Le 22/09/2014 18:09, Fabien Bodard a écrit :
> strange...
>
> has we can say Control = TextBox ... no ?
>

No, it's the other way.

TextBox inherits Control, so you can assing a TextBox to a Control 
variable, but not the contrary.

[...] returns a native array, so you can't assign it to a variable whose 
datatype is a class that inherits that native array.

We need the ability to implement an automatic conversion functions 
directly in Gambas, not just in C/C++. I won't do that now!

-- 
Benoît Minisini




More information about the User mailing list