Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Properties/Methods in a Non-Visual Class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00419182
Message ID:
00419186
Views:
19
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform