How bout an IAttachable Interface?
In the layouts, I need to perform certain actions just as the layout is basically "attached" to the group, and when it is "detached". A few of the basic cases are hardcoded right in the GroupBase's layout accessor, such as setting the target to null and removing an eventlistener, and I would like to customize that.
For instance, some layouts might modify the includeInLayout property on their children, or might add an offset to the position that's required for the layout, for centering, rotation, etc.... So when I switch layouts, I need to make sure I reset the defaults, in the "detach" method.
public interface IAttachable
{
function attach(target:Object):void;
function detach(target:Object):void;
}
You can also use that for an IAnimator, if there was one, and IController, or ICamera, ILayout, etc.
- Lance
