Thanks, Paul. I just commented on issue 4073 with a rough outline of how
this can be fixed. I've accepted it and marked it for an upcoming milestone.

On Thu, Sep 24, 2009 at 4:48 AM, Paul Robinson <[email protected]> wrote:

>
> AbsolutePanel.add(Widget,int,int) used to append widgets, the same as
> AbsolutePanel.add(Widget) still does now. Following rev 6070/6071, it
> now inserts instead, and not always at the end. This caused a problem
> for me because I'm using this method to add a GlassPanel using
> RootPanel.get().add(glass,0,0), and trunk after 6070 means that the
> glass panel isn't in front of all the things it's meant to be in front
> of because it's been inserted in the wrong place.
>
> It used to say this:
>
>  public void add(Widget w, int left, int top) {
>    w.removeFromParent();
>    setWidgetPositionImpl(w, left, top);
>    add(w);
>  }
>
> but was changed to say this:
>
>  public void add(Widget w, int left, int top) {
>    w.removeFromParent();
>    int beforeIndex = getWidgetCount();
>    setWidgetPositionImpl(w, left, top);
>    insert(w, beforeIndex);
>  }
>
> The reason this fails for me is that not everything in the panel is a
> widget, so RootPanel.get().getWidgetCount() returns a number smaller
> than DOM.getChildCount(RootPanel.get().getElement())
>
> I presume that this is a bug and not a feature. Reverting this one
> method looks like the right thing to do to me.
>
> I created issue 4073 for this:
> http://code.google.com/p/google-web-toolkit/issues/detail?id=4073
>
> Paul
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to