Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create Properties/Methods in a Non-Visual Class
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00419182
Message ID:
00419186
Vues:
18
>I have a non-visual class. I will know how to add a new method or property to this class programmaticaly.
>
>I Try.
>
>1 SET CLASSLIB TO myclassfile.vcx ADDITIVE
>2 loObject1=CREATEOBJECT("myclass")
>3 loObject1.ADDOBJECT("notes","mynewreference")
>4 loObject1.notes
>5
>6 DEFINE mynewreference AS myclass
>7 PROCEDURE notes
>8 WAIT WINDOW "HELLO WORLD..."
>9 ENDPROC
>10ENDDEFINE
>
>
>But tell me that "notes" is not defined. If I change line 4 work, but create a new object inside the myclass.
>
>4 loObject1.mynewreference.notes
>
>The only I want is to be able to refere to this class properties/methods in the same way as I created with the wizard.
>
>EX. loObject1.notes instead of loObject1.mynewreference.notes

Normally when you do this you should have
loObject1.notes.notes
You add a object named notes. and in that notes object you want to call the notes method.
If you want it to do directly you have to add the procedure to the first class.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform