a) To convert a vcx to a prg :
-Either do it in prg from start
-Or use Class browser\View code to get prg version
Yes your code is a prg sample.
b) Directly create the form from prg version.
In earlier versions (before VFP6) :
set procedure to myclasses.prg
myform1 = createobject('myform')
In VFP6 and later :
myform1 = NewObject('myform','myclasses.prg')
Cetin
>nice one!
>a) how about converting the vcx to prg (is this a utility/function to do this)?
>so that it would do something like this on my myform.prg:
>DEFINE CLASS MyForm AS Form
> PROCEDURE Click
> = MESSAGEBOX('MyForm has been clicked!')
> ENDPROC
>ENDDEFINE
>
>b) when the definition of the class is done on the prg. then i compiled it so i can use the fxp, how do i use that class inside my form's button.click()?
>should i do this:
>do myform.fxp
>myform1 = createobject('myform')
>myform1.click()
>
>-tia
>
>>Erik,
>>1) You could directly define the custom class (as any other class) in >a .prg too and give the fxp.
>>2) After creating your .vcx (take a backup) :
>>
>>compile classlib myclasses.vcx
>>use myClasses.vcx excl
>>replace all methods with ''
>>pack memo
>>use
>>
>>And you can give away .vcx.
>>Cetin
>
>>>hi,
>>>i can use my "calculate_payment.fxp" by installing it to my clients application directory located at C:\ACCTG.
>>>when changes to the formula for calculating the payment, i just compile my "calculate_payment.prg" and have the resulting "calculate_payment.fxp" deployed to my client's computer.
>>>i don't include the ".prg" for the purpose of securing my source code.
>>>i'm thinking of maybe using a vfp custom class. example: objCalc.vct/objCalc.vcx
>>>
>>>so i when i call objCalc.CalculatePayment() it will work. but how do i deploy it to the client by simple giving him only the ".vcx" file. i know this won't work, but what would be the alternative? using still the vfp class.
>>>-tia