BuildLegend and THStack

Hello ROOTers,
It will be usefull to add iteration through collections(e.g. THStack) in the BuildLegend method. I failed to find something in this sense for drawing a THStack object with a TLegend.
Regards, Valery.

Might better/simpler to add a BuildLegend method in THStack… What do you think ?

It seems that in this case THStack will have to be an owner of TLegend object or
a BuildLegend method should act as( part of) a Draw one. Then an option of a Draw might be a reasonable solution.

No, I meant it should act as the BuildLegend in TPad: it would create a new independent.object

Say, i have already drawn a stack and reated a legend before adding a new entry.
So i have to remember to add the correspomding entry to the legend by hand
or create a new one.