Konu: Code order
Hello:
One thing is nagging at me. In code that Cetin helped me with, I have
PUBLIC oForm
oForm = CREATEOBJECT('MainMenu')
oForm.Show()
*
DEFINE CLASS MainMenu AS Form
Height = 900
...
ENDDEFINE
Here, a form (oForm) base on a class (MainMenu) is created before the class. Often, in VFP, a name that is invoked before it exists means that VFP crashes. Not so here; this works. How come?
But, logically, even if this does work, should it not be
DEFINE CLASS MainMenu AS Form
Height = 900
...
ENDDEFINE
*
PUBLIC oForm
oForm = CREATEOBJECT('MainMenu')
oForm.Show()
?
Regards,
Hans L