>PUBLIC variables won't work when i call in the form. why is it that all the public variable that i declared in the main program will be missing in the form. here's my code.
>
>***Main.Prg
>PUBLIC oMyObject
>SET CLASSLIB TO myClass
>oMyObject = CreateObject("App")
>oMyObject.Init()
>DO FORM MyForm
>
>
>***MyForm.Scx
>
>*Init Method at myform.scx
>WAIT WINDOW oMyObject.MyText
>
>
>The oMyObject is missing when i run the program. is there anything wrong with my code or is there any setup in the VFP6 to activate the Public variable. please help me...
Take a look at READ EVENTS. main.prg won't pause at DO FORM (unless the form is modal), but continue. Probably you have a CLEAR ALL or CLOSE ALL later on.
Something like this:
oMyObject = CreateObject("App")
DO FORM MyForm
READ EVENTS
CLEAR ALL
CLEAR EVENTS
HTH, Hilmar.
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)