>This is a bit late (couple of years), however, it still may be of some benefit.
>
>I too, wanted to programmatically add new methods to a Class Library. After some trial and error, I did find the following WILL work.
>
>* NOTE: CRLF needs to be included, otherwise, when two or more methods are added the format will be incorrect.
>REPLACE RESERVED3 WITH '*' + ALLTRIM(LOWER(Thisform.txtcMethodName.Value)) + CHR(13) + CHR(10) ADDITIVE
>
>It does appear that using the following will NOT work:
>
>lcMethodList = ALLTRIM(RESERVED3)
>REPLACE RESERVED3 WITH lcMethodList + '*' + ALLTRIM(LOWER(Thisform.txtcMethodName.Value))
The following should work:
REPLACE RESERVED3 WITH lcMethodList + CHR(13) + CHR(10) + '*' + ALLTRIM(LOWER(Thisform.txtcMethodName.Value)) + CHR(13) + CHR(10)
In VFP9 this is even easier since WriteMethod and AddProperty now accept additional visibility (public, protected or hidden) and comment/description parameters.
Mark E. McCasland, MCP, MVP VFP
Hurst, TX USA
Thanks Mark, I'm hoping to upgrade this fall.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement