Project

General

Profile

Actions

Bug #1715

closed

New package window is not set to visible

Added by Saurabh Garg over 19 years ago. Updated about 19 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
morpho - general
Target version:
Start date:
10/13/2004
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
1715

Description

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

Michael,
I quick review of your code (and ours) does not reveal any obvious
problem! We use the statement
"UIController.showNewPackage(adp);"
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 =
UIController.getInstance().getCurrentActiveWindow();
Point pos = morphoFrame.getLocation();
Dimension size = morphoFrame.getSize();
try {
ServiceController services = ServiceController.getInstance();
ServiceProvider provider =
services.getServiceProvider(DataPackageInterface.class);
DataPackageInterface dataPackage = (DataPackageInterface)provider;
dataPackage.openHiddenNewDataPackage(adp, null);
UIController controller = UIController.getInstance();
MorphoFrame newMorphoFrame = controller.getCurrentActiveWindow();
newMorphoFrame.setLocation(pos);
newMorphoFrame.setSize(size);
newMorphoFrame.setVisible(true);
morphoFrame.setVisible(false);
controller.removeWindow(morphoFrame);
morphoFrame.dispose();
}
catch (ServiceNotHandledException snhe) {
Log.debug(6, snhe.getMessage());
morphoFrame.setVisible(true);
}
}

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?

Dan

Finch, Michael wrote:

> Hi Dan,
>
> Some URLs...
> Plugin homepage
> http://scidb.evergreen.edu/Members/mike/morphoPlugin
>
> Plugin CVS
> http://kermit.evergreen.edu/horde/chora/cvs.php/Morpho_AccessImport
>
> The Actual Plugin code...
>
http://kermit.evergreen.edu/horde/chora/co.php/Morpho_AccessImport/src/edu/tesc/
scidb/morpho/plugins/ImportMSAccessPlugin.java?r=1.1
>
> 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
>
Actions #1

Updated by Saurabh Garg about 19 years ago

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

Actions #2

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 1715

Actions

Also available in: Atom PDF