Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a event to an object
Message
From
08/05/2008 09:09:55
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
01315742
Message ID:
01315820
Views:
12
>and by subclassing? the object is already in memory and named oMyObject
>how can i subclass and still the object be oMyobject?

My idea was to subclass BEFORE the object is in memory. Let's say that right now, you have a class cNoSourceCode and that you create an object oMyObject, based on that class.

cNoSourceCode --> oMyObject

You should change this, so that you create a class cMyDerivedClass, based on the class cNoSourceCode. Then, you create an object oMyObject, based on the class cMyDerivedClass. Before instantiating the object, you can add code to certain events of class cMyDerivedClass.

cNoSourceCode --> cMyDerivedClass --> oMyObject

Is there any reason why this would not be feasible?
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform