Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-19717

"Error #3200: Cannot perform operation on closed window" received after window is closed, reopen again.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • Adobe Flex SDK Previous
    • None
    • Spark: Window
    • None
    • Affected OS(s): Windows
      Language Found: English

    Description

      Steps to reproduce:
      1. compile and run following code:
      <?xml version="1.0" encoding="utf-8"?>
      <s:WindowedApplication xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:mx="library://ns.adobe.com/flex/halo"
      xmlns:local="*"
      creationComplete="openAWindow()"
      close="myWin.close()">
      <!-- test window is closed, set some properties, then reopen,
      verify properties are changed
      -->
      <fx:Script>
      <![CDATA[
      import spark.layouts.BasicLayout;
      import spark.components.Button;
      import spark.components.Window;
      import spark.components.CheckBox;
      public var myWin:Window=new Window();
      public function openAWindow():void
      {
      myWin.systemChrome="standard";
      myWin.title="test window1";
      myWin.status="this is a status";
      myWin.layout=new BasicLayout();
      myWin.width=300;
      myWin.height=300;
      myWin.open(true);
      myWin.close();
      }
      public function toggleWindow():void
      {
      if (check1.selected)
      {
      myWin.width=400;
      myWin.height=400;
      myWin.alwaysInFront=true;
      myWin.visible=true;
      if (myWin.closed)
      myWin.open(true);
      check1.label="window opened";
      }
      else
      {
      if (!myWin.closed)
      myWin.close();
      check1.label="window closed";
      }
      }
      ]]
      >
      </fx:Script>

      <s:CheckBox id="check1" x="130" y="150" label="close" click="toggleWindow()" />
      </s:WindowedApplication>

      2. when windowedApplication shows up, click checkbox
      ->window shows up
      3. click checkbox, it will close the window.
      ->window is closed, which is expected.
      4. repeat step 2, click checkbox to open the window again
      ->receive run time error:
      Error: Error #3200: Cannot perform operation on closed window.
      at Error$/throwError()
      at flash.display::NativeWindow/get minSize()
      at spark.components::Window/get minWidth()[E:\dev\trunk\frameworks\projects\airframework\src\spark\components\Window.as:843]
      at spark.components::Window/set width()[E:\dev\trunk\frameworks\projects\airframework\src\spark\components\Window.as:947]
      at window_close_open_issue/toggleWindow()[C:\work_flex_sdk\bugs\window2\src\window_close_open_issue.mxml:33]
      at window_close_open_issue/__check1_click()[C:\work_flex_sdk\bugs\window2\src\window_close_open_issue.mxml:51]

      Expected Results:

      no error, repeat step 2~4, window should open/close as expected without any error.

      Workaround (if any):

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: