Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class merging ... Feature or Bug! 8-)
Message
From
30/10/2001 12:50:12
Charles Richard
Nvo Management Systems
Boisbriand, Quebec, Canada
 
 
To
29/10/2001 08:29:12
Emanuele Bonin
EB Soluzioni Informatiche
Tezze S/B, Italy
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00574396
Message ID:
00575182
Views:
20
For those interested, here is a prg which recreates the problem:
*Classproblem.prg
IF !FILE('sub\b2.vcx')
  DO makeclasses IN classproblem.prg
ENDIF
DO checkclasses IN classproblem.prg

PROCEDURE makeclasses
MESSAGEBOX("To the class which appears, add a label with caption 'class 1', fontsize 24 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 b1 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 b2 AS baseform FROM classes
CLEAR ALL
MD sub
MESSAGEBOX("Save the following class as is", 0, "Class Problem")
CREATE CLASS BASE OF sub\b1 AS BASE FROM b1
CLEAR ALL
MESSAGEBOX("Save the following class as is", 0, "Class Problem")
CREATE CLASS BASE OF sub\b2 AS BASE FROM b2
CLEAR ALL

PROCEDURE checkclasses
MODIFY CLASS BASE OF sub\b1 NOWAIT
MESSAGEBOX("sub class b1: you should see 'class 1'", 0, "Class Problem")
CLOSE ALL
MODIFY CLASS BASE OF sub\b2 NOWAIT
MESSAGEBOX("sub class b2: you should see 'class 2'", 0, "Class Problem")
CLOSE ALL
MODIFY CLASS BASE OF sub\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 BASE OF sub\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
>I Found a strange BUG on VFP 6.0 dn 7.0 (i tried with these versions).
>
>I have this situation on my classlibrary:
>
>directory Libs\:
> Baseclass.VCX
> FormBase as FORM
>
> BaseClass1.VCX
> Base AS FormBase FROM Baseclass.VCX
> Add a Label with Caption = 'Class1'
>
> BaseClass2.VCX
> Base AS FormBase FROM Baseclass.VCX
> Add a Label with Caption = 'Class2'
>
>
>directory Subclass\:
>
> NewClass1.VCX
> Base AS Base FROM ..\Baseclass1.VCX
>
> NewClass2.VCX
> Base AS Base FROM ..\Baseclass2.VCX
>
>
>Now If i issuess this commands:
>
>MODIFY CLASS base OF SubClass\NewClass1.vcx
>
>I'll see the class with Label caption 'Class1', successively i will issue
>
>MODIFY CLASS base OF SubClass\NewClass2.vcx
>
>I'll see the class with Label caption 'Class2', all ok .... but if successively i will issue
>
>MODIFY CLASS base OF SubClass\NewClass1.vcx
>
>I'll see the class with Label caption 'Class2' !!!!!!!!!!!!!! and if i'll save the class i will have problem.
>
>I Hacked the VCX files and i saw that the 'classloc' column of newclass1.vcx is changed on the record that indicate the mother class of 'base' class.
>
>Someone can say me if this problem is known by Microsoft ?? I have no found it on Knowledge Base.
>
>Someone, a Samaritan, can help me to compose (in a good English ... not mine) the report bug form to send to Microsoft ??
>
>Thanx in Advance.
Charles Richard
NVO Management Systems
crichard@nvo.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform