Bug #4941
closed
Data search causes menus to disappear on the mac
Added by Chad Berkley over 14 years ago.
Updated over 14 years ago.
Description
If you do a data search on the mac, all of the menus in the menu bar disappear and never return. To recreate, click the data tab, type in a search term, click "search". the menus will disappear.
This seems to only happen when the authentication dialog appears. If the auth dialog does not appear, the menus are fine.
Hey Chad,
This sounds like bug#4247. Is null being passed in as first param to a showConfirmDialog or a showMessageDialog?
This is indeed a problem with the JDialog not having a parent. I am working on a solution to get the parent from the currently open tableaux. I have a question in to Christopher to try to find a solution.
Here is the current code that does not quite work:
Iterator effigy = directory.entityList(Effigy.class).iterator();
Tableau t = null;
System.out.println("looking for effigy");
if (effigy != null && effigy.hasNext())
{
Effigy e = (Effigy)effigy.next();
t = e.showTableaux();
}
//...call t.getFrame() and pass that to the auth dialog.
This does not work because it opens a new tableau. We just need a reference to the one that is already open.
Ok, I got this fixed. The key was to get the graphTableau from the ModelDirectory, from which you can then get the Frame. Here's the code for future reference:
//find the parent tableau to use as the parent for this dialog
Iterator effigy = directory.entityList(Effigy.class).iterator();
Tableau t = null;
while (effigy.hasNext())
{
Effigy e = (Effigy)effigy.next();
t = (Tableau) e.getEntity("graphTableau");
if(t != null)
{
break;
}
}
controllingDialog = new JDialog(t.getFrame());
Original Bugzilla ID was 4941
Also available in: Atom
PDF