[Gambas-user] Possible bug extending array class of non-native classes [Was: Advising methods of non-fixed argument tuple in a parent class]

Bruno Félix Rezende Ribeiro oitofelix at ...181...
Wed Apr 16 06:01:43 CEST 2014


Em Tue, 15 Apr 2014 12:55:51 +0200
Tobias Boege <taboege at ...626...> escreveu:

> And finally let me tell you something about extending classes: it gets
> especially cool when you call your extending class like the extended
> class. Above, you would not call your class VariantArray but
> Variant[]. [ At present, you have to create .src/Variant[].class
> outside of the IDE in your project because the IDE forbids use of
> brackets in class names. However, the interpreter doesn't seem to
> have any problems with that. ]
> 
> That way, you are overriding the Variant[] class in the interpreter's
> global symbol table, using inheritance, i.e. you extend it. You can
> add features to Variant[] which are immediately available to all
> users of the Variant[] class without having to change any code.
> That's explained in the docs as well[1].

Strangely this extension trick doesn't work with an array of a
non-native class.  The interpreter doesn't complain, but no events or
methods defined in the extended class are raised or called.  Could you
please confirm this?  Do you think this is a bug?  If not, do you have
an explanation for this strange behavior?

-- 
 ,= ,-_-. =.  Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
((_/)o o(\_)) There is no system but GNU;
 `-'(. .)`-'  GNU Linux-Libre is one of its official kernels;
     \_/      All software must be free as in freedom;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20140416/53b4df80/attachment.sig>


More information about the User mailing list