🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.lenguajes.java
Article #26641

Re: Problema con add

#26641
From: Fifeton
Date: Mon, 07 Dec 1998 00:00
25 lines
1110 bytes
Jonathan Revusky wrote:
> 
> Fifeton wrote:
> >
> > Pero al llegar a esta parte del c�digo, me da una excepci�n:
> >
> >         if (posicion>=0){
> >                 getParent().remove(this);
> >                 getParent().add(this);
> >         }
> >
> 
> Despues del remove(), �claro que el getParent() devuelve un null! Es
> l�gico. Piensalo. Necesitas algo as�:
> 
>         if (posicion>=0){
>             Container parent = getParent();
>             parent.remove(this);
>             parent.add(this);
>         }
> 

Pues es verdad. Qu� fallo!

Gracias! Fifeton
Technical Details
Message-ID: <366BFF56.EBFC6F4A@iname.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3667D8A8.518E8BA7@iname.com> <3667FD53.A86EB1F5@jet.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: 1116f3,c265076514babff
X-Google-Attributes: gid1116f3,public
From: Fifeton <fifeton@iname.com>
Subject: Re: Problema con add
Date: 1998/12/07
Message-ID: <366BFF56.EBFC6F4A@iname.com>
X-Deja-AN: 419670561
Content-Transfer-Encoding: 8bit
References: <3667D8A8.518E8BA7@iname.com> <3667FD53.A86EB1F5@jet.es>
Content-Type: text/plain; charset=iso-8859-1
Organization: Bilbomatica S.A
Mime-Version: 1.0
Newsgroups: es.comp.lenguajes.java