>          override public function addElementAt(c:Object, index:int):void
>          {
>              if (c is IUIBase)
>              {
> -                actualParent.addChildAt(IUIBase(c).element as
> DisplayObject, index);
> -                IUIBase(c).addedToParent();
> +                               if (c is IChrome) {
> +                                       addChildAt(IUIBase(c).element as
> DisplayObject, index);
> +                                       IUIBase(c).addedToParent();
> +                               }
> +                               else {
> +                       actualParent.addChildAt(IUIBase(c).element as
> DisplayObject, index);
> +                       IUIBase(c).addedToParent();
> +                               }
>              }
> -            else
> -                actualParent.addChildAt(c as DisplayObject, index);
> +            else {
> +                               if (c is IChrome) {
> +                                       addChildAt(c as DisplayObject,
> index);
> +                               } else {
> +                       actualParent.addChildAt(c as DisplayObject, index);
> +                               }
> +                       }
>          }
>
>
This would be a confusing API to the user, isn't it?  Can we split it up
into two methods: addElementAt(o:Object,i:int) and
addChromeElementAt(o:IChrome,i:int)  ?

Thanks,
Om

Reply via email to