Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a event to an object
Message
De
08/05/2008 15:04:31
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Divers
Thread ID:
01315742
Message ID:
01315937
Vues:
20
>>>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?
>
>actually your idea is neat! But the problem is that the code for the custom class is inside an .exe file
>
>can I create a subclass from a custom class inside a exe file?
>
>if i can do that, i can create the subclass with the access method and create the new object then replace the old object with the new one with a simple
>
>oOldObj = oNewObj
>
>
>think possible?

Sure it is - but will require hacking. Not feasable for distribution, only for yourself. Might be unlegal as well.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform