Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to: Create a New Method like .AddProperty
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00950263
Message ID:
00950541
Vues:
15
>Hi Mark,
>
>... and if you go to VFP9, WriteMethod and AddProperty have 2 additional parameters that allow you to specify the visibility of the Property or Method (e.g., Public, Protected or Hidden) as well as a parameter to provide a description.
>
>I try to find something about it in VFP9 help... But nothing there...
>Maybe this feature isn't documented yet...
>
>Could you give me an example?

WriteMethod('MyMethodName', 'code here', .T., nVis, 'description here')

nVis = 1 for Public, 2 for protected or 3 for hidden

The 3rd parameter is .T. if the method needs to be created, .F. if the method already exists. My experience has been that if you pass .T. and the method already exists, no error is generated, and the code is still written to that method.

AddProperty('PropName', 'prop_value', nVis, 'description here')
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform