Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing for an object
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00539160
Message ID:
00539176
Views:
12
Randy,
ThisForm.AddObject("myclass")

IF TYPE("THISFORM.MyClass") = "O"
  MESSAGEBOX('Abject Created.')
ENDIF

IF VARTYPE(THISFORM.MyClass) = "O"
  MESSAGEBOX('Abject Created.')
ENDIF
TYPE("myClass") is returning "U" because it is looking for a memory variable named MyClass.

Will

>Hi. VFP6. I am trying to test for the presence of an object that I created with ThisForm.AddObject("myclass")
> TYPE("myclass") always returns "U". Any idea why?
Heavy Metal Pedal - click with care
Previous
Reply
Map
View

Click here to load this message in the networking platform