Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameters to generalised prompt/edit form
Message
 
 
To
12/02/2002 07:46:05
John Faithfull
Hunterian Museum, University of Glasgow,
Glasgow, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00618212
Message ID:
00618772
Views:
25
>Hello Larry,
>
>Thanks for that. However, my ignorance and almost total lack of experience in OOP are a big problem here. Where in my project should the class be defined?
>
>I've put the "define class SesParam" statement in a prg called from the main program, but I get "Class definition SesParam is not found" when I subsequently try to use use createobject("sesparam").
>
>Any advice? Sorry for being a pain - I can see it may take a while for me to get my brain round this!
>
>Thanks again
>

John,
You need to do one of the following options:

1. Put the definition in a Main PRG - the definition will be available becuase the PRG is in memory
2. Put the definition into a PRG and use newobject() instead of createobject to instantiate it - Ex. loparam = newobject('sesParam','mynewprg.prg')
3. Put the definition into a PRG and use SET PROCEDURE TO so that all functions/definitions in that PRG will be available - Ex. set procedure to mynewprg.prg additive
4. Define the class as something like Line or Custom in a class library using the visual designer and use SET CLASSLIB TO so that all classes in it will be available - set classlib to mynewclasslib.vcx additive

Personally, I like #2 but that's just me.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform