Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clever way to close all cursors
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00124575
Message ID:
00124590
Vues:
24
Hi Evan,

Create a custom class named something like cSaveCursors with a property array named aCursors. Then, in the init of the class add the following code:

= AUSED(This.aCursors)

In the destroy add this code:

LOCAL ;
laCursors[1], ;
lnCursors

LOCAL ;
laCursors[1], ;
lnCursors

lnCursors = AUSED(laCursors)
FOR lnI = 1 TO lnCursors
IF ASCAN(This.aCursors, laCursors[lnI,1) = 0
USE IN (tcCursor)
ENDIF
NEXT


Then all you need to do is something like loCursors = CreateObject("cSaveCursors") and when loCursors is released all cursors that were opened after it was instantiated will be closed.
Mike Feltman

F1 Technologies
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform