Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with a class based on Form
Message
From
17/03/2005 10:16:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Miscellaneous
Thread ID:
00996788
Message ID:
00996789
Views:
9
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform