Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OO Design Question and recursion question?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00266441
Message ID:
00266501
Vues:
20
Derek,

VFP6 has a recursive limit now of 128 calls.

You can have a class tree where Part is the superclass and you derive SimplePart and CompositePart from Part. CompositePart has an aggregation component back to Part. Look at the Composite design pattern.

>I am doing a project that requires a bill of materials for a part. In the subassembly for that part, can be raw material, labor, subcontract, or another part with possible nested subassemblies.
>My question is with the design, should I create a subassembly class with a link to the parent Part # and links to all the items in the subassembly, or should I do something else? I have thought about the children having a pointer to the parent, but the problem would be that a part could be in more than 1 bill of materials or more than 1 subassembly for a bill of materials (like nails or screws).
>
>Second, how well does VFP6 handle recursion with objects? I had done a similar project in VFP5 that was not OO and I had to be real carefull with doing recursion so not to crash out VFP.
>Thanks
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform