[Project_owners] opening a dialog just after closing it

Eric Jung grimholtz at yahoo.com
Mon Jul 4 14:23:41 EDT 2005



--- Michael Vincent van Rantwijk <mv_van_rantwijk at SPAMFREEyahoo.com>
wrote:

> Eric Jung wrote:
> > Hi,
> > 
> > In my extension's settings dialog, there is a point where I need
> to
> > close the dialog and re-open it so as to pick up some new
> settings.
> 
> What kind of setting are that? Are the setting global vars?

Both global variables and custom datasources for a treeview. Rather
than set all the global variables and remove/re-add the custom
datasource, it's easier to re-open the dialog because all of that is
done when the dialog opens.

> 
> > I have this code in the dialog:
> > 
> >   window.close();
> > 
> > and then:
> > 
> >   myOverlayVariable.open();
> 
> What is 'myOverlayVariable'? Is that a chromewindow?


It is also a global variable, called passwordMaker. If it helps, I
tried using a setTimeout() to open the dialog after window.close().
That didn't work, but I do notice that the browser's icon in the
taskbar highlights when the openDialog code executes.


> 
> > where myOverlayVariable is defined in my overlay of
> > browserOverlay/navigatorOverlay.
> > 
> > I don't get any Javascript errors, but the dialog never re-opens.
> The
> > code for open() is simple:
> > 
> >   passwordMaker.dlg = window.openDialog(xulfilename,
> > "passwordmakerdlg", "dialog,chrome,resizable=yes",
> > {passwordMakerHelper:passwordMaker.passwordMakerHelper});
> >   passwordMaker.dlg.focus();
> > 
> > I've used dump() statements to ensure window.openDialog() is
> being
> > called... but still no dialog opens.
> > 
> > Does anyone have ideas about why this might be happening?
> > 
> > Thanks in advance for any tips,
> > Eric
> 
> Michael
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 



		
__________________________________ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 



More information about the Project_owners mailing list