Hi guys,
I'm really unhappy with the structure of families in construct and try to think of a better way to handle this issure, since I have a lot of class inheratance. I've made up an example, which hopefully make you understand my problem. Let's assume the atachment is my class model and I create one family for each class. (I love car examples ).
Imagine one day a costumer comes to my vehicle rental agency. His requirements are:
- He wants a land vehicle
- All motorcycles should be in first row
- all trucks should be in last row
- When he clicks on a motorcycle show me the horsepower
This is what I would do:
Pick all vehicles
---Foreach Vehicles
---LandVehicles = Vehicles.UID
-------Show LandVehicle
------Foreach LandVehicles
------Motorcycles = LandVehicle.UID
----------Put motorcycle in first row
------Foreach LandVehicles
------Trucks= LandVehicle.UID
---------Put truck in last row
On click Motorcycle
Vehicle = Motorcycle.UID
---show Vehicle.horsepower
Is there any better solution? I mean there are a lot of foreach loops. And the biggest problem: I can't even access my instance variables from other families. For example horsepower is an attribut that's shared by all vehicles. But when I click on a specific vehicle I always have to reference to the family.