Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
(OOP) Part Time Composite Objects?
Message
De
27/08/2003 15:50:27
 
 
À
27/08/2003 13:30:28
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00822766
Message ID:
00823925
Vues:
24
>>More like naming my children rather than calling them child(1) and child(2).
>
>Child1 and Child2 -- Dr. Seuss-ian, no? Is this the name of the "parent" propert(ies) in which you're storing the child reference(s)? If not, I'm thoroughly confused! Maybe a code example would help... How about one where the children are being stored (and named), and another one showing how you're attempting to reference them later?

txtGPA.Value = Enrollment.MyCourses.GetGPA()
txtProgramcost.Value = Enrollment.MyCharges.GetTotalCharges()

When both Enrollment and MyCourses are on the form, I can set Enrollment.MyCourses = Thisform.Mycourses and be done. This also works when I happen to want a GPA and don't have a MyCourses around to ask -- which is what led me to start this thread. You should be able to ask an Enrollment what the GPA is, but it doesn't know. While the double reference technically breaks strict OOP standards, it makes more sense than adding a function whose sole job is to call the same function on another object.

My understanding of GetBizObject() means extra code to handle the reference, and isn't as obvious about what is happening.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform