Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Old Bug ... fixed ?
Message
De
08/10/2002 08:16:38
Emanuele Bonin
EB Soluzioni Informatiche
Tezze S/B, Italie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Old Bug ... fixed ?
Divers
Thread ID:
00708692
Message ID:
00708692
Vues:
48
The following code demostrate a bug that i discover sometime ago in VFp7 & 6 ...

The bug involve two classes that have the same name but are in two different class-container, when this classes are used for subclassing in the same work-session without issuing a CLEAR ALL between the operation, VFP act a "classMerging".

I supposed that VFP in his cache, when try to reuse the cached classes, performs erroneous searches.

Can, Anyone that have VFP8.0 Beta, try this code for me, and say me if the problem persist ?

Thanx in Advance

** Cut Here
IF !FILE('sub\b2.vcx')
cProg = SYS(16)
DO makeclasses IN &cProg
ENDIF
cProg = SYS(16)
DO checkclasses IN &cProg
RETURN

PROCEDURE makeclasses
MESSAGEBOX("To the class which appears, add a label with caption 'class 1', fontsize 24 and AutoSize = .T. then save the class", 0, "Class Problem")
CREATE CLASS baseform OF classes AS FORM
CLEAR ALL
MESSAGEBOX("Save the following class as is", 0, "Class Problem")
CREATE CLASS BASE OF base1 AS baseform FROM classes
CLEAR ALL
MESSAGEBOX("Change the caption of the next classes label to 'class 2'", 0, "Class Problem")
CREATE CLASS BASE OF base2 AS baseform FROM classes
CLEAR ALL
MESSAGEBOX("Save the following class as is", 0, "Class Problem")
CREATE CLASS SubBASE1 OF b1 AS BASE FROM base1
CLEAR ALL
MESSAGEBOX("Save the following class as is", 0, "Class Problem")
CREATE CLASS SubBASE2 OF b2 AS BASE FROM base2
CLEAR ALL
ENDPROC

PROCEDURE checkclasses
MODIFY CLASS SubBASE1 OF b1 NOWAIT
MESSAGEBOX("sub class b1: you should see 'class 1'", 0, "Class Problem")
CLOSE ALL
MODIFY CLASS SubBASE2 OF b2 NOWAIT
MESSAGEBOX("sub class b2: you should see 'class 2'", 0, "Class Problem")
CLOSE ALL
MODIFY CLASS SubBASE1 OF b1 NOWAIT
MESSAGEBOX("back to sub class b1: you should see 'class 1' but you see 'class 2'", 0, "Class Problem")
CLOSE ALL
CLEAR ALL
MODIFY CLASS SubBASE1 OF b1 NOWAIT
MESSAGEBOX("back to sub class b1: you should see 'class 1' and you see 'class 1' because CLEAR ALL was issued", 0, "Class Problem")
CLOSE ALL
ENDPROC

** Cut Here
bye, Emanuele!
In the beginning the Universe was created.
This has made a lot of people very angry and been widely regarded as a bad move.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform