Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't clear CAD / DTE classes
Message
 
À
22/06/2016 03:43:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01637449
Message ID:
01637580
Vues:
102
FWIW here's what I use for a macro (F4) to clear my envirronment:
CLEAR
CANCEL
CLEAR ALL
CLOSE ALL
RELEASE ALL
CLEAR PROGRAM
Which typically works. I've seen instances when it's required twice in a row if it's a circular reference.

+++ Rick ---



>Rick,
>
>I've tried almost everything possible; here is the most simple test case (DTE: dataEnvironment, CAD: cursorAdapter):
>
>&& start VFP IDE
>modify class DTEclass_with_CADclass of some.vcx && OK
>&& close class designer
>
>modify class formClass_with_DTEclass_with_CADclass of some.vcx && OK
>&& close class designer
>
>modify class DTEclass_with_CADclass of some.vcx && KO: "Remove class from memory?" > yes > "cannot modify class that is in use"
>
>clear class formClass_with_DTEclass_with_CADclass
>modify class DTEclass_with_CADclass of some.vcx && KO: "Remove class from memory?" > yes > "cannot modify class that is in use"
>
>clear all
>modify class DTEclass_with_CADclass of some.vcx && KO: "Remove class from memory?" > yes > "cannot modify class that is in use"
>
>Sys(1104)
>modify class DTEclass_with_CADclass of some.vcx && KO: "Remove class from memory?" > yes > "cannot modify class that is in use"
>
>&& BUT...
>
>&& quit VFP IDE
>&& start VFP IDE
>
>o = createObject('formClass_with_DTEclass_with_CADclass')
>o.Show(1)
>&& close form
>
>modify class DTEclass_with_CADclass of some.vcx && OK!!!
>
>
>
>Looks like the dataEnvironment class:
>- does not release when form is 'instantiated' by class designer
>- releases OK when form is instantiated by createObject() or newObject()
>
>>Usually when that happens there is still something holding open the file. Is it possible there's another instance of FoxPro running somewhere that has this file loaded or open in the edior? Check in Task Manager.
>>
>>I've run into locking issues like this myself, but usually it clears up based on a lock from some other location.
>>
>>I've also had an interesting issue recently where FoxPro somehow managed to create multiple instances of the same class in the same VCX file. Saving would sometimes work, sometimes not as saves would write to various random versions in the file.
>>
>>The whole VCX/SCX system was a cruel joke by the FoxPro team on us :-) So many possibilities for corruption not to mention all the bloody hassles related to managing source control. But for visual components unfortunately there's no other choice.
>>
>>+++ Rick ---
>>
>>>>>Hi,
>>>>>
>>>>>I have a form in a vcx using a DataEnvironment (DTE) class from a same .vcx (thru DEclass/DEclassLibrary), including some CursorAdapter (CAD) classes from the same vcx.
>>>>>
>>>>>After I open the form class, either in the designer or running it, and close it properly, I can no longer modify the DTE and CAD classes in the designer:
>>>>>
>>>>>Remove class from memory?
>>>>>Yes
>>>>>Cannot modify a class that is in use.
>>>>>
>>>>>
>>>>>None ot these help:
>>>>>
>>>>>clear all
>>>>>release all
>>>>>close all
>>>>>
>>>>>The only way out is
>>>>>
>>>>>quit
>>>>>
>>>>>
>>>>>Ever worked around this issue?
>>>>
>>>>As soon as one of the form or dataenvironment classes is edited, the .vcx is opened and left opened by the VFP internal operations and it seems there is no way to close it again. If one tries to USE it exclusively, VFP will report "File is in use" although there is no trace of it being used (not in SET("CLASSLIB"), not in Data Sessions manager, not in DISPLAY MEMORY, not in?...).
>>>>
>>>>I tried with other classes in other .vcx and they work as expected: once the editing is finished, the .vcx is closed and may be freely USEd.
>>>>
>>>>So, probably there is no workaround...
>>>
>>>
>>>Thanks Antonio,
>>>
>>>The only way out is probably quit.
>>>Better have super fast _startup routines!
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform