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:
00993212
Vues:
14
Barbara,

Unfortunately it was a bit too soon to cheer.

I did as you suggested, subclassed _Pages to MorePages, but the error is the same.

I presume I'll have to subclass _Page as well.

I'll let you know how I fare.




>>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.
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform