cheerq / flexmdi

Automatically exported from code.google.com/p/flexmdi
0 stars 0 forks source link

create and maximize window via AS code give error when user restore that maximized window #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. with the MDIExampleExplorer.mxml, in the addWindow() function, add this
line of code rigth before close the function and after all the normal code:
win.maximize();
2. the entire function will be like this:
private function addWindow():void
{
var win:MDIWindow = new MDIWindow();
win.width = 350;
win.title = "Window " + String(mdiCanvas.windowManager.windowList.length + 1);
mdiCanvas.windowManager.add(win);
win.maximize();
}
3. then run the program. Click on the button: "Add Window". Now click on
the restore button of the newest window.

What is the expected output? What do you see instead?
expected: window appear, maximize and user can restore it to the original
width and heigh that it was created in AS code.
what happens: when user click on restore, an error appear with the msg:
TypeError: Error #1009: Cannot access a property or method of a null object
reference.
    at flexmdi.effects.effectsLib::MDIVistaEffects/getWindowRestoreEffect()
    at flexmdi.managers::MDIManager/::windowEventProxy()
    at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio
n()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at flexmdi.containers::MDIWindow/maximizeRestore()

What version of the product are you using? On what operating system?
flexmdi 1.0, on Flex2.0.1, windowsXP

Please provide any additional information below.

Original issue reported on code.google.com by illogic....@gmail.com on 29 Nov 2007 at 8:21

GoogleCodeExporter commented 8 years ago
Window size is now assigned and saved by default, preventing this error

Original comment by ben.clin...@gmail.com on 10 Jan 2008 at 9:27