Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ON KEYLABEL DEL DO CLASS??
Message
From
20/10/1997 02:31:41
 
 
To
20/10/1997 00:53:09
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00055377
Message ID:
00055464
Views:
27
also note you have to have the object name in scope
or else it will not know what myObj is

if you have general OKLs you can do stuff like
_screen.activeform or _screeen.activeform.activecontrol etc.

another possibility is to use the Keypress event of the object (of of the form + keypreview=.t.) and handle it in this level

Arnon


>>>>Anyone Knows how to run a class's method in
>>>> ON KEY LABEL DO
>>>>Thks!
>>>
>>>ON KEY LABEL DEL MyClass.MyMethod()
>>
>>Thks but I tried and it gave me
>> "object not found!"
>>I had set classlib but it still gave me error!?
>>
>>Must the object be in the file .prg instead of .vcx??!
>
>No, VCX is ok. But you must create an object from your class (ie: instantiate your class). A class is only a template or like an abstract object. You may have the definition of a car (this is the class). But you must have a real car in order to use it (this is the object).
>
>To create an object from a class definition: Look in the Help at CreateObject() and AddObject().
>
>SET CLASSLIB only tells VFP where to look for class definitions. It doesn't create any object.
>
>Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform