Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating Classes with code
Message
From
28/12/1998 01:29:42
 
 
To
28/12/1998 01:13:37
Anthony Test
Microcomputer Engineering Services, Llc
Huntington Beach, California, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00170664
Message ID:
00170665
Views:
21
>I've just started to try making a class via code. My idea for a 'baby' project was to create a form with a couple of buttons that would call me code created object. The following is the code I have written to create the calling object. (I've named it Test.prg)
>
>
>Define Class Junk as Custom
>
>	Function Say_Hello
>		wait window 'Hello'
>	End Function &&-- Say Hello
>
>	Function Say_Goodbye
>		Wait window 'Good Bye'
>	End Function &&-- Say Good Bye
>
>EndDefine
>
>
>Now whe I run this code what is happening? I was thinking that a junk.vcx would appear on my hard drive, so I could add it to my project no such luck. So please tell me oh-wise ones what should I be doing to get this to work?
>
Anthony:

You are creating a .prg not a .vcx. A .vcx is created if you create a class library from the project manager and put a class in it. It is merely a fancy .dbf that is chuck full of memos. You could probably define and populate your own .vcx from code, but I have absolutely no idea why anyone would bother.

Bottom line, if you create a class in code, it is created whenevery you run the code, but is does not become part of a class library (.vcx table), and ceases to exist when you exit from your code.

If this sounds garbled, its because its late (or early, I guess)

regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform