Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing objects
Message
From
07/01/1999 12:53:36
 
 
To
07/01/1999 12:49:54
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00172935
Message ID:
00173645
Views:
37
James,

Good Luck! Do post your solution when you've got it.

Kenneth

>>I noticed something about RemoveObject. If you issue RemoveObject and AddObject (with the same name) in sequence, you'll find that AddObject fails because the object still exists :-
>>
>>.RemoveObject('abc')
>>.AddObject('abc','cClass')
>>
>>This seems to happen in VALIDs. The RemoveObject is called, but not until all the VALID code is executed, that the RemoveObject (from FORM) fires. It's like the VALID logged a message with the main VFP event handler to RO, then the VALID code finishes furst, then only the message is handled in the FORM's event loop.
>>
>Kenneth,
>
>Since VFP is multi-threaded, I would not be surprised if potentially lengthy operations like removeobject are not relagated to a second thread. Which would mean in this case that while the alternate thread is removing the object, the primary thread attempts to add it, which causes an error because the object still exists at that instant.
>
>Definately something to look at. This would expain why Debug/Trace shows the code proceeding even though the container object has (visually at least) not yet been removed.
>
>Good thought.
>
>regards,
Kenneth.
Previous
Reply
Map
View

Click here to load this message in the networking platform