Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating your own class
Message
 
To
14/04/1998 17:16:48
Mark Kessler
U.S.M.C. - Network Operation Center
Quantico, Virginia, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00091939
Message ID:
00091954
Views:
22
>I have created my own class that is a child of the class PAGE.
>
>Example:
>
>DEFINE CLASS newpage AS Page
> PROCEDURE Click
> [code inside Click]
> ENDPROC
>ENDDEFINE
>
>I can't figure out how to implement it into my project. I first got errors saying I couldn't put the CLASS definition inside an EVENT. So I moved it to a startup like program... this way I could run the program and then 'do report c:\test\report.scx'.
>The program runs until it gets to the ENDDEFINE then it ends.
>
>
>Why won't it run the DO command I have in the next line?

The DEFINE CLASS code is not intended to run procedurally. Typically, if you have your class definitions in a .PRG file, you would SET PROCEDURE TO MyFile.prg and then instantiate the object with CREATEOBJECT('newpage'). Then you can call newpage.Click().

HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform