Re: [Gambas-user] OO design problem?

2016-08-30 Thread Fabien Bodard
The three way are : Implemented in the base Class : hChild.Function() Implemented since a least the second inheritance level : 'hChild must be typed as Object if hChild is SubTypeClass then hChld.Function Totaly random : 'hChild must be typed as Object Try hChild.Function if Error then Erro

Re: [Gambas-user] OO design problem?

2016-08-30 Thread adamn...@gmail.com
On Mon, 29 Aug 2016 01:13:01 +0300 Jussi Lahtinen wrote: > > It's not unnecessary in fact. Imagine if a children not implement the > > property... then it's the property in the parent that is readed. > > > > Yes I know, but in my case it is unnecessary. > But if I understand you correctly then

Re: [Gambas-user] OO design problem?

2016-08-30 Thread Christof Thalhofer
Am 30.08.2016 um 18:20 schrieb Fabien Bodard: >> Yes, but in my case I also need corresponding private Variables, >> which hold the data. > I think this can be added but the problem is to manage anybody > variable calling. Yes, I think this should not be done by default. Often a property value

Re: [Gambas-user] OO design problem?

2016-08-30 Thread Fabien Bodard
2016-08-30 12:18 GMT+02:00 Christof Thalhofer : > Am 29.08.2016 um 09:20 schrieb Fabien Bodard: > >> In the IDE if you write : >> >> Property MyProp As Integerand validate >> >> >> The all the stuff (_Read, _Write) is automagiquely added at the end of the >> file >> >> You just have to validat

Re: [Gambas-user] OO design problem?

2016-08-30 Thread Christof Thalhofer
Am 29.08.2016 um 09:20 schrieb Fabien Bodard: > In the IDE if you write : > > Property MyProp As Integerand validate > > > The all the stuff (_Read, _Write) is automagiquely added at the end of the > file > > You just have to validate at the end of the property declaration line Yes,

Re: [Gambas-user] OO design problem?

2016-08-29 Thread Jussi Lahtinen
On Mon, Aug 29, 2016 at 10:20 AM, Fabien Bodard wrote: > In the IDE if you write : > > Property MyProp As Integerand validate > > > The all the stuff (_Read, _Write) is automagiquely added at the end of the > file > > You just have to validate at the end of the property declaration line

Re: [Gambas-user] OO design problem?

2016-08-29 Thread Fabien Bodard
2016-08-29 8:19 GMT+02:00 Christof Thalhofer : > Am 28.08.2016 um 20:37 schrieb Jussi Lahtinen: > >> It's very likely that I have missed something and I have some crucial >> design problem. So all suggestions are welcome! >> Thanks! > > Hm, if I declare properties in a parent class I do this only f

Re: [Gambas-user] OO design problem?

2016-08-28 Thread Christof Thalhofer
Am 28.08.2016 um 20:37 schrieb Jussi Lahtinen: > It's very likely that I have missed something and I have some crucial > design problem. So all suggestions are welcome! > Thanks! Hm, if I declare properties in a parent class I do this only for the correct work of methods, that depend on the exist

Re: [Gambas-user] OO design problem?

2016-08-28 Thread Jussi Lahtinen
> It's not unnecessary in fact. Imagine if a children not implement the > property... then it's the property in the parent that is readed. > Yes I know, but in my case it is unnecessary. > Another way is to not declare the property in the parent and use an > object type to walk the children. >

Re: [Gambas-user] OO design problem?

2016-08-28 Thread Fabien Bodard
It's not unnecessary in fact. Imagine if a children not implement the property... then it's the property in the parent that is readed. Another way is to not declare the property in the parent and use an object type to walk the children. Dosometing(hChild as Myclass) dim hObj as Object = hChild

[Gambas-user] OO design problem?

2016-08-28 Thread Jussi Lahtinen
I have class which is meant only to function as parent to other classes. This class have empty properties and methods, which are there only to be over-driven in the children classes. If I remove them I get error that the properties are not declared, and if I remove the properties from the parent I

Re: [Gambas-user] OO

2008-12-12 Thread Jussi Lahtinen
Thanks! Now the solution looks obvious. Jussi On Fri, Dec 12, 2008 at 8:55 PM, Fabien Bodard wrote: > dim i as integer > dim tavk as new object[] > dim o as object[] > > for i = 0 to 4 > o = new object[] > tavk.add(o) > next > > 2008/12/12 Jussi Lahtinen : >> Object Oriented approach is prett

Re: [Gambas-user] OO

2008-12-12 Thread Fabien Bodard
dim i as integer dim tavk as new object[] dim o as object[] for i = 0 to 4 o = new object[] tavk.add(o) next 2008/12/12 Jussi Lahtinen : > Object Oriented approach is pretty new to me, so... > > PUBLIC tavk AS Object[2] > > tavk[0] = NEW Object[] > tavk[1] = NEW Object[] > > This works, as I

[Gambas-user] OO

2008-12-12 Thread Jussi Lahtinen
Object Oriented approach is pretty new to me, so... PUBLIC tavk AS Object[2] tavk[0] = NEW Object[] tavk[1] = NEW Object[] This works, as I want to create two object arrays. But I need it to be dynamic array of array of objects, is it possible somehow? Other words, I need to add tavk[] obj