>Ok, how would that be done if using DO FORM and not CREATEOBJECT? To my knowledge, there is no method on the form where you can declare variables that will persist for the life of the form, right (without declaring them public)? Typically, I create form properties as a general rule, but I'm in the middle of converting a ton of FPD26 screens and the code already exists to create the vars that are used in the screen in the old FPD26 screens setup and I'd like to use the vars instead of form properties to speed up the process for now. Any ideas short of running a prg to declare the vars that then calls the form?
Why not just move the code that creates the variables into the calling prg? In your example, that would be between "Public xform" and createobject().
I know this is totally dirty and utterly non-OOP, but knowing your line is dead... er, you having a deadline...
>>
>>PUBLIC xform
>>xform=CREATEOBJECT("myform")
>>xform.show
>>DEFINE CLASS myform as Form
>> xnumber=22
>> PROCEDURE init
>> priv xnumber2
>> xnumber2=33
>> ENDPROC
>>ENDDEFINE
>>
>>
>>xnumber is a property not a variable and valid in all life of form. and xnumber2 is only a variable. dead with end of init.