Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
(OOP) Part Time Composite Objects?
Message
 
À
22/08/2003 16:56:32
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00822766
Message ID:
00822892
Vues:
20
This message has been marked as a message which has helped to the initial question of the thread.
Hi Chris,

I've done this before.

How about adding a couple of properties to the parent bizobj and make them point to child objects on an as-needed basis.

if this.ChildObject1 is not type object and we need it to be an object
create child object and have the parent-object property point to it
endif

etc etc etc.

Is this what you have in mind?

Alex


>Because my actual problem domain is complex*, I'm going to use Invoices and Line Items as an example. An Invoice business object deals with everything Invoice, and a LineItems business object performs likewise. LineItems is useful by itself. Invoices is also useful by itself. Invoices often, but not always, uses a LineItems object - Total cost of an invoice is a function on Invoice, but can only be performed by summing LineItems.
>
>The framework makes it fairly easy to drop a new bizobj on a form and hook it into the chain, but running the containership heirarchy is sometimes problematic. And, it means some functions wouldn't work from a programmatic interface, as they might not have the child object required. That would be a nice ability to have.
>
>Is there an easy way to have the child objects available when I want them, without dragging them around all the time? Instantiation time and object count are a concern.
>
>Chris.
>
>*Complex: Three or four "children" business objects, sometimes two or three layers deep. And no, it doesn't simplify to smaller trees gracefully.
Low-carb diet not working? Try the Low-food diet instead!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform