[Gambas-user] Call control from one module
Fabián Flores Vadell
fabianfloresvadell at ...626...
Thu May 13 17:19:17 CEST 2010
> I had no idea of this utility, would comment on the forum.
>
> Regards
>
Hi Craf, note than "properties" is a OOP feature. So, if you write
your programs according to OOP, that's ok (and I fully agree with the
criteria of Jesús), but if you write your programs according to the
paradigm modular/structured, the technique that you should use is
different: you should use a parameter in your routine.
' In the FMain
PUBLIC SUB proc_add(pString AS String)
control.text= pString
END
'In the Module
proc_add("Hola")
How you can see, in this case, that's almost the same than using a
property. In fact, if you use this routine instead a property, is
perfectly valid not only to the paradigm modular/structured, but to
OOP paradigm too: I mean, in OOP you can use procedures or functions
instead properties (but not allways) to set data members of a class.
This seems just a theorical disquisition, but the message is than is
better working with one paradigm, unless you have enough knowledge
about the paradigms that you merge.
Regards.
--
Fabián Flores Vadell
www.speedbooksargentina.blogspot.com
More information about the User
mailing list