Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WHere do I create the object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00116265
Message ID:
00116286
Vues:
17
Sandy,

Why not make chk_ssn a custom method of txtSSN? This way you make the object more encapsulated and therefore easier to reuse.

You can drop one of the oSSN objects onto your form and then use it like:

returnvalue = thisform.oSSN.chk_ssn( this.Value )

but when you do this you tie those two objects together which might not be an optimal design in all cases.

>Hello All,
>
>I've finally succeeded in creating my owm class (a text box for SSN numbers). I've also created another custom class that holds all the in-house functions that we have decided to bring over from the FPD.
>
>In this custom class, there are a number of "functions" and one is called chk_ssn (check the ssn number).
>
>In the valid of the txtssn there is code that reads
>
>returnvalue = oSSN.chk_ssn(THIS.value)
>
>The probelm is that oSSN I've created from the command window with a createobject command.
>
>The question!!
>
>Where do I put (either in the txtssn class or somewhere) else the the command for callling the object oSSN or where do I annotate it??
>
>Thanks
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform