how do u create sub properties for a property in a class?
If there is a module titled "Person" and a property titled
"Hand", how do i create a property titled "Left" that
will be a property of Hand?
Person.Hand.Left= blahblahblah
thx for any help
Printable View
how do u create sub properties for a property in a class?
If there is a module titled "Person" and a property titled
"Hand", how do i create a property titled "Left" that
will be a property of Hand?
Person.Hand.Left= blahblahblah
thx for any help
Create a class with right and left properties ten declare Hand as that class.
yes but hand is a property of person, and i don't think
i ever had to create more and more cls modules based
on how many sub properties i had for a class
if i had
Person.Hand.Left
Person.Hand.Right
Person.Leg.Left
Person.Leg.Right
i would need 3 cls modules......1 for person, 1 for hand, and
1 for leg where hand and leg are sub properties of the
person class
i did this before and i don't think this is how i went about
it.
the proper OOP way of doing this is:
Person has a left_hand
has a right_hand
has a left_leg
has_a right_leg
all of which are classes. you might even have all the body parts inherit from a super class like body_parts. s you can have Person has many body_parts.
anyways, VB OOP is silly (read as sucks).
Which bings me to another point. You would be coding an extra property for no reason
Look at this
Hand property with 2 properties
Left and Right
Vs.
HandLeft
HandRight
There is no point in writting useless code.