[Gambas-user] OO design problem?
Fabien Bodard
gambas.fr at ...626...
Mon Aug 29 09:20:46 CEST 2016
2016-08-29 8:19 GMT+02:00 Christof Thalhofer <chrisml at ...3340...>:
> 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 existence of these
> properties in childs.
>
> If a child does not overwrite the property, it has to be fulfilled by
> the parent, so the property in the parent has to bedeclared with
>
> property_read() ...
>
> property_write() ...
>
> so that methods later work in a correct way. That is a logical
> consequence of the inheritance of properties.
>
> For the mess of writing such a thingy by hand all the time I wrote for
> me a little tool, the getter-setter-creator, it could be much better as
> it is (id does only string, integer, float and date), but it works for
> me. I attach it.
In the IDE if you write :
Property MyProp As Integer and 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....
>
>
> Alles Gute
>
> Christof Thalhofer
>
> --
> Dies ist keine Signatur
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Fabien Bodard
More information about the User
mailing list