>Hi all
>i have created a class based on form and i want to create an instade of that in a form.But when i writ this lines :
>
>oForm=CreateObject('MyClass')
>oForm.visible=.t.
>
>the object creat and released.it released imediatly and i don't know why? any help
>
>Ali
oForm goes out of scope. Either declare as public or have read events.
ie:
public oForm
oForm=CreateObject('MyClass')
oForm.visible=.t.
or:
oForm=CreateObject('MyClass')
oForm.visible=.t.
read events
define class myClass as form
*...
procedure QueryUnload
clear events
endproc
*...
enddefine
Cetin