i have understood that a namespace is a container of units; but i haven't understood well as work with it. I try to explain better, about what i want tell. For example i have four units:
1) Animals // es: class TAnimals
2) Animals.Dog // es: class TDog
3) Animals.Cat // es: class TCat
4) Animals.Cat.Female // es: class TFemale
Of course, this four units are in four different file. If i make new unit and need use all it, i write:
uses
Animals, Animals.Dog, Animals.Cat, Animals.Cat.Female
Now, until are very few problem not there is, but when are very much? So i wanted to know as i can manage better, making one only unit: Animal (namespace root) that contain all other, having so something as:
uses
Animals;
And to have access from Animal to all other classes defined in all other namespace of second,third etc level, for example:
program Project1;
uses
Animals;
var
x: Animals;
begin
x := TAnimals.Cat.Female.Create;
try
....
finally
x.Free;
end;
end.
Searching in internet, maybe i have found something using interface, but i have impression that not correct solution becouse in my opinion is much complicated for something that with delphi xe2 is native. Much probably i mistake, or it do refer to some older version of delphi; sincerly i don't know. But i wanted know as i do to do it, of course if possibile. Thanks again very much.