Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What should I return ...
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00749629
Message ID:
00749639
Views:
21
>I am creating class that builds a tree of objects and ending up with a collection of collections. See below. I am getting the impression that a procedure call like this:
>
>loFooBranch = CreateObject([Collection])
>loFooBranch = this.getFee(Feepk, loFooBranch)
>
>May be bad practice. In the procedure getFee another object is added to the loFooBranch passed.
>
>Should I be doing this instead?
>
>loFooBranch = CreateObject([Collection])
>loFiReturn = this.getFee(Feepk)
>loFooBranch.add(loFiReturn.name, loFiReturn)
>
>
>Any thoughts?

I kind of get the same impression you do, but I really can't think of any problem with the first syntax. Given a choice, I'd go with the second, because it seems to me that that makes it more obvious what you're doing, and hence more maintainable down the line.

(BTW, you misspelled GetFo, and left GetFum out of your sample altogether.)
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform