Because it has to be triggered when native redefineClose fires.
As I said, I'm not too good with javascript, I'm using the native
function as a way to get my own close icon in the corner of the
dialogue box's header.

I'm using a techique I read here;
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/2950c44985a26cdf/fefcfcf5644959ba

Which works great, but means the close is triggering native
javascript.
Unless theres some way, in turn, to get that to trigger a normal
removeFromParent()  ?

On Feb 23, 8:46 pm, Jason Essington <[email protected]> wrote:
> You must like memory leaks ...
>
> If you manage to remove a widget from DOM this way, you leave in tact  
> the link between GWT and DOM preventing any objects removed from being  
> garbage collected.
>
> Is there some reason you can not simply perform a  
> widget.removeFromParent() completely negating the need to muck about  
> in DOM yourself?
>
> -jason
>
> On Feb 23, 2009, at 6:01 AM, Darkflame wrote:
>
>
>
>
>
> > If it helps, I've discovered it does work in Firefox, but not IE.
> > So I'm guessing a difference in the removeChild function?
>
> > On Feb 23, 11:04 am, Darkflame <[email protected]> wrote:
> >> Sorry, that was just another mistake copying, I can assure you it  
> >> also
> >> dosnt work with the correct;
>
> >>    var removethis = $doc.getElementById('fade');
> >>             removethis.parentNode.removeChild(removethis);
>
> >> On Feb 23, 5:58 am, davidroe <[email protected]> wrote:
>
> >>> because the child you are trying to remove is oNodoToRemove, not
> >>> removeThis?
>
> >>> /dave
>
> >>> On Feb 22, 4:46 pm, Darkflame <[email protected]> wrote:
>
> >>>> *correction I was using;
>
> >>>>  var removethis = $doc.getElementById('fade');
> >>>>  removethis.parentNode.removeChild(oNodeToRemove);
>
> >>>> (not $wnd, before anyone points that out)
>
> >>>> On Feb 23, 1:42 am, darkflame <[email protected]> wrote:
>
> >>>>> I'm not too good with Javascript, but this is what I got;
>
> >>>>>                var removethis = $wnd.getElementById('fade');
>
> >>>>> removethis.parentNode.removeChild(oNodeToRemove);
>
> >>>>> But this seems to cause a crash, despite the fact that (checking
> >>>>> firebug) the element I want to remove certainly has the ID set to
> >>>>> fade.
> >>>>> I'm using this as part of a redefined close-header for a GWT  
> >>>>> Dialogue,
> >>>>> incidently. (the close functionality is working just fine, the  
> >>>>> full
> >>>>> function is;
>
> >>>>>         private native void redefineClose(DialogBox dialogBox) /
> >>>>> *-{
> >>>>>            $wnd['closeDialog'] = function () {
>
> >>>>> [email protected]::hide()();
>
> >>>>>                var removethis = $wnd.getElementById('fade');
> >>>>>             removethis.parentNode.removeChild(oNodeToRemove);
>
> >>>>>            }
>
> >>>>>         }-*/;
>
> >>>>> )
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to