Information générale
Catégorie:
The Mere Mortals Framework
>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement