Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a event to an object
Message
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:
01315953
Views:
11
>>Hola Selim,
>>
>>>what i am trying to do is to have an exact copy of an object but with an aditional method
>>>after created then replace the old object in memory with the new one
>>
>>Did you take a look at the wrapper idea? Would that help you?
>
>
>Your code seems very interesting. However, seems to me that this wrapper only changes myClass Value when I change the value on the wrapper instance.
>
>I need the opossite, return or do something when the value on the object is changed

That was why I asked before exactly what do you wanted to do, the wrapper can only track changes made by you, not changes made internally by the other class, and it was not clear for me when you just say "do something when the value on the object is changed" for you can still use the wrapper idea if the changes were not internal. The idea of the wrapper is that you never instantiate the real class, you always instantiate the wrapper, which will act as a delegate of your class, so anything you do to the wrapper class is passed to the real class giving you the chance to intermediate, but of course it can not do anything for changes or accesses made by the real class itself (although you could put a timer in the wrapper to check it's own value against the real class, but that would be ugly and incomplete, only for assigns)

Sorry, but I run out of ideas <g>
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform