Bug #1715

New package window is not set to visible

Added by Saurabh Garg over 17 years ago. Updated over 17 years ago.

morpho - general
Target version:
Start date:
Due date:
% Done:


Estimated time:


Finch, Michael <> found a bug where in some cases after a
new package window is created it is not shown. Below is the text of the emails
exchanged between Dan and Michael:

Hi Dan,

So I figured out what is going on, it's subtle and took me a while to figure
out. When an access database is imported it just imports the data description,
not the data. Therefore when the DataViewer tries to render the data it can't
and it popups with the warning "Unable to display this data. However, an empty
table with the column header information will be shown.".

I debugged Morpho and stepped through UIController.showNewPackage_base()
Here is the problem. When this line executes...
MorphoFrame newMorphoFrame = controller.getCurrentActiveWindow();
The log popup message is the current active window. The old window is hidden,
the popup goes away and we never set the new package window to visible.

I confirmed all this by simply commenting out the line that produces the log
message in the first place. After that everything works fine.

This bug can be reproduced without my plugin. Create a new datapackace, add a
table (Describe, Manual, Offline), update the usage rights (or anything), and
the window will disappear.

Thanks for your help,
Mike Finch

-----Original Message-----
From: Dan Higgins [mailto:]
Sent: Tue 10/12/2004 1:01 PM
To: Finch, Michael
Cc: Saurabh Garg; Matt Jones
Subject: Re: MS Access Plugin

I quick review of your code (and ours) does not reveal any obvious
problem! We use the statement
in a number of places elsewhere in Morpho without seeing your problem.

I am a bit busy at the moment and do not have time to ummediately
dig into the code. But if you do have some time, here is what I suggest.
The 'showNewPackage' method in the UIController class calls
'showNewPackage_base(adp' This method is
private static void showNewPackage_base(AbstractDataPackage adp) {
MorphoFrame morphoFrame =
Point pos = morphoFrame.getLocation();
Dimension size = morphoFrame.getSize();
try {
ServiceController services = ServiceController.getInstance();
ServiceProvider provider =
DataPackageInterface dataPackage = (DataPackageInterface)provider;
dataPackage.openHiddenNewDataPackage(adp, null);
UIController controller = UIController.getInstance();
MorphoFrame newMorphoFrame = controller.getCurrentActiveWindow();
catch (ServiceNotHandledException snhe) {
Log.debug(6, snhe.getMessage());

This method tries to set the new window to the size/location of the old
window. If you have already closed the old window there may be a
problem. Otherwise, I would look for the Log message from the catch
block in this statement for a hint. [Morpho creates a log file
(stderr.log); Or you can set the properties to turn that off and see
messages in the DOS window.]

Or maybe you have looked and there are no error messages?


Finch, Michael wrote:

> Hi Dan,
> Some URLs...
> Plugin homepage
> Plugin CVS
> The Actual Plugin code...
> At the bottom of the execute() method, after I modify the package, I
> try to reopen it so it can be saved. There is a bunch of commented
> out stuff as I was trying different things. I have seen it work
> correctly a few times, but my test has been to create a new
> datapackage and then import a database. After import the window
> disappears...
> Thanks,
> Mike Finch


#1 Updated by Saurabh Garg over 17 years ago

I will ask Michael to test this.
I am closing the bug for now.

#2 Updated by Redmine Admin over 9 years ago

Original Bugzilla ID was 1715

Also available in: Atom PDF