[kepler-dev] [Bug 3134] - demo workflow 02-LotkaVolterraPredatorPrey.xml needs windows resaved

bugzilla-daemon@ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Tue Feb 5 18:22:36 PST 2008


------- Comment #3 from cxh at eecs.berkeley.edu  2008-02-05 18:22 -------
It looks like saving the location of the Display window is broken
in Ptolemy II 7.0.beta, so it is likely broken in Kepler 1.0.0.rc1.

If, in ptII6.0.2, I create a Ramp -> Display model, run it
and then move the Display window, the following MoML appear

     <property name="_windowProperties"
               value="{bounds={659, 270, 348, 232}, maximized=false}">

However, that moml does not appear if I do the same thing in 7.0.beta.

It looks like this change to WindowPropertiesAttribute causes the
2007-12-01 18:10  eal

        * ptolemy/actor/gui/: WindowPropertiesAttribute.java (1.33),
        SizeAttribute.java (1.37): Do not force persistence to be true,
        since this causes externally defined icons to be exported in the

2007-12-01 18:09  eal

        * ptolemy/kernel/util/NamedObj.java (1.332): Fixed bug where icons
        were getting exported to MoML.

If I back out the change to WindowsPropertiesAttribute, then the
position of Display Windows is saved.

Edward, do you have any quick suggestions here?

Chad, you could hack in the above MoML into each Display so it
would have the WindowPropertiesAttribute.  For example, a Display
named "Display" would look like:

    <entity name="Display" class="ptolemy.actor.lib.gui.Display">
        <property name="_windowProperties"
                 value="{bounds={675, 514, 334, 234}, maximized=false}">
        <property name="_location"
                  class="ptolemy.kernel.util.Location" value="{430, 140}">

If you add that attribute by hand then the location will be preserved.

Or, you could skip it, pending us fixing this bug in Ptolemy.

More information about the Kepler-dev mailing list