Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optional number of parameters and protected procedure
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01182425
Message ID:
01182450
Vues:
40
>>>Use a array instead or an object, or default the parameters the first method doesn't get and send them all.
>>>
>>
>>Thanks, Al. For my particular purpose I have to know exactly how many parameters I passed.
>
>How about to name parameteres in public method:
>
>param1, param2.....,param3
>** Then in that same method:
>
>PARAMETERS param1, param2.....,param3
>LOCAL lcMacros, lnFor
>lcMacros = [thisform.PrivateMethod(]
>FOR lnFor = 1 TO PCOUNT()
>    lcMacros = lcMacros + [param]+TRANSFORM(lnFor)+[,]
>NEXT
>lcMacros = LEFT(lcMacros, LEN(lcMacros)-1)+[)]
>&lcMacros
>
>not tested at all.

I did something like this before, but thought it would be easier to just add one more parameter with the number of parameters <g> And I already did, so now I'm struggling with other problems I introduced trying to merge two different frameworks into one.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform