[Gambas-user] Advising methods of non-fixed argument tuple in a parent class

Benoît Minisini gambas at ...1...
Tue Apr 22 11:50:45 CEST 2014


Le 15/04/2014 03:56, Bruno Félix Rezende Ribeiro a écrit :
> Hello all!
>
> Suppose we want an array of variants which has the nice property of
> raising an event after any modification, like addition or removal of
> ...

Hi,

I have just came back from "holidays", and I haven't read all the 
pending mails yet.

I just want to say that if you have problem with Gambas inheritance and 
"SUPER" limitations, you can replace inheritance by "composition".

I mean : instead of inheriting "Variant[]" or reimplementing it, you can 
create your own "MyVariantArray" class that embeds a Variant array as a 
private dynamic variable. Then you will be able to do almost everything 
you need.

Another point: It's not a good idea to reimplement native array classes. 
These classes must be as fast as possible, they are used everywhere. I 
don't think that you need an "Update" event for every array in your 
application, do you?

Regards,

-- 
Benoît Minisini




More information about the User mailing list