Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error loading class: Class definition is cyclical?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
MS SQL Server
Divers
Thread ID:
00992765
Message ID:
00992831
Vues:
34
>Subclassed _Pages from Pageframe, memberclass _Page.
>Pagecount = 1
>
>A formclass MyForm, has _Pages1, Pagecount = 2 defined.
>
>In the form designer:
>
>Add another instance of _Pages (MorePages1) on _Page1 of _Pages1
>Set Pagecount = 2
>
>oMyForm = CREATEOBJECT('MyForm') - works
>
>Add yet another instance of _Pages (MorePages2) to _Page2 of _Pages
>oMyForm = CREATEOBJECT('MyForm') - works
>
>Set Pagecount = 2
>oMyForm = CREATEOBJECT('MyForm') get's me
>
>Error loading record... MaintenancePages or one of it's members:
>Pagecount - cannot add _Page2, class definition is cyclical.
>
>TIA

I ran into a variation of this problem a few years ago. The problem only occurs on VCX based forms where you have nested container objects that are inheriting from the same parent.

In your case, that would be the second instance of _pages (Morepages1) that you have nested in the first pageframe.

All you need to do to fix this is to create a subclass of your _Pages pageframe, and use that class for the second instance instead of using _Pages directly. You don't have to have any changes to properties or methods in this new subclass.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform