|
Loading...
|
gambas-user@lists.sourceforge.net
[Prev] Thread [Next] | [Prev] Date [Next]
Re: [Gambas-user] Gambas bug? Emil Lenngren Fri Feb 10 16:00:50 2012
Ok, I understand your issue. But unfortunately, I don't know any good way how to do it in Gambas. In C++ there are private inheritance that solves the problem, but Gambas only has public inheritance. Maybe Benoit can find out some way how to inherit only "some" of the symbols from a base class, if many Gambas programmers want that, and disallow such an inherited object to be cast to an ancestor class? /Emil 2012/2/11 Fabián Flores Vadell <[EMAIL PROTECTED]> > 2012/2/10 Emil Lenngren <[EMAIL PROTECTED]> > > > So what you want is to extend the array class with some extra methods? > > Just use > > Inherits Person[] > > in the PersonList class ;) > > > > Did you read the code and comments? > > Not at all. I don't want use inheritance because I won't all methods and > properties from Array[] in the PeopleList interfaz. Hence, I have to use > aggregation (composition, delegation). > > If I use inheritance, the clients of PeopleList could do bad things or > things that have no sense (as the case), e.g. > > PeopleList.Fill > PeopleList.Push > PeopleList.Pop > > This isn't the best example. But if you think about a minute, you will > catch it. > > Do not focus on the example, because really, what I want isn't to add to a > class methods from an array (that's just an example). I looking for a > design pattern that allows me to solve a typical problem. > > That problem could be described as "How to add methods from a helper object > without have to rewrite a wrapper for each method (with just a call within) > in the host class?". > > -- > Fabián Flores Vadell > www.comoprogramarcongambas.blogspot.com > www.speedbooksargentina.blogspot.com > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Gambas-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Gambas-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/gambas-user
- Re: [Gambas-user] Gambas bug?, (continued)
- Re: [Gambas-user] Gambas bug? Fabián Flores Vadell 2012/02/10
- Re: [Gambas-user] Gambas bug? Jussi Lahtinen 2012/02/10
- Re: [Gambas-user] Gambas bug? Fabián Flores Vadell 2012/02/10
- Re: [Gambas-user] Gambas bug? Emil Lenngren 2012/02/10
- Re: [Gambas-user] Gambas bug? Fabián Flores Vadell 2012/02/10
- Re: [Gambas-user] Gambas bug? Fabián Flores Vadell 2012/02/10
- Re: [Gambas-user] Gambas bug? Emil Lenngren 2012/02/10
- Re: [Gambas-user] Gambas bug? Fabián Flores Vadell 2012/02/10
- Re: [Gambas-user] Gambas bug? Emil Lenngren 2012/02/10
- Re: [Gambas-user] Gambas bug? Fabián Flores Vadell 2012/02/10
- Re: [Gambas-user] Gambas bug? Emil Lenngren 2012/02/10 <=
- Re: [Gambas-user] Gambas bug? Fabián Flores Vadell 2012/02/10
- Re: [Gambas-user] Gambas bug? Bruce Bruen 2012/02/11
- Re: [Gambas-user] Gambas bug? GMail 2012/02/11
- Re: [Gambas-user] Gambas bug? Fabián Flores Vadell 2012/02/11
- Re: [Gambas-user] Gambas bug? Fabián Flores Vadell 2012/02/11
- Re: [Gambas-user] Gambas bug? Benoît Minisini 2012/02/11
- Re: [Gambas-user] Gambas bug? Fabián Flores Vadell 2012/02/11
- Re: [Gambas-user] Gambas bug? Benoît Minisini 2012/02/11