ya it is but I thought that when I am creating the new popup it should not
be a problem. The reason it is null is because I am making it null. Here is
the function for the popup,

if (!popup) {
    popup = new GeoExt.Popup({
        title: "Feature Info",
        width: 200,
        maximizable: true,
        collapsible: true,
        map: panel.map,
        location: loc,
        anchored: true,
        listeners: {
            close: function () {
                // closing a popup destroys it, but our reference is truthy
                popup = null;
            }
        }
    });
}

Thanks,
Smaran

On Wed, Oct 10, 2012 at 7:26 PM, Phil Scadden <p.scad...@gns.cri.nz> wrote:

> On 11/10/2012 3:16 p.m., Smaran Harihar wrote:
> > Thanks Phil. I was basically creating popups and closing them, if they
> > were open, using,
> >
> > if (popup) popup.close();
> >
> > Not sure why that causes the error?
>
> I gather that fixed it? I'm guessing the scope allowed js to remove it.
> You might need code to see if pop needs to be created. If you leave that
> line in, then step through code on response and see what value popup has
> in the error creating situation. I'd guess null.
>
> Notice: This email and any attachments are confidential. If received in
> error please destroy and immediately notify us. Do not copy or disclose the
> contents.
>
>


-- 
Thanks & Regards
Smaran Harihar
_______________________________________________
Users mailing list
Users@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to