2 Replies Latest reply on Feb 21, 2007 4:41 PM by 무말랭이

    Problem handling popup is created on datagrid

    무말랭이


      hi ~!

      I've been in trouble for a few days because of popup on datagrid.

      I made a grid in parent App and when clicking any row, the popup show.

      if i open and close once, it goes well however I open again and ERROR: #1010 occurs while closing popup.

      does anyone have any idea???

      Please make me escape from that Error message......
        • 2. Problem handling popup is created on datagrid
          무말랭이 Level 1
          error #1010
          at mx.controls::DataGrid/::commitEditedItemPosition()
          at mx.controls::DataGrid/mx.controls:DataGrid::updateDisplayList()
          at mx.core::UIComponent/validateDisplayList()
          at mx.managers::LayoutManager/::validateDisplayList()
          at mx.managers::LayoutManager/::doPhasedInstantiation()
          at Function/ http://adobe.com/AS3/2006/builtin::apply()
          at mx.core::UIComponent/::callLaterDispatcher2()
          at mx.core::UIComponent/::callLaterDispatcher()

          this is parent Codes

          <?xml version="1.0"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
          <mx:Script>
          <![CDATA[
          import mx.collections.ArrayCollection;
          import mx.managers.PopUpManager;
          import mx.core.IFlexDisplayObject;

          [Bindable]
          public var resultList:ArrayCollection = new ArrayCollection ( [
          {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"}, {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"},
          {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"}, {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"}, {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"}, {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"}, {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"}, {jipockUnionResultNo:"sss",lineName:"aa",selectYN:"aaa"}
          ]);

          private function showLogin():void {
          var mf:MyLoginForm =
          MyLoginForm(PopUpManager.createPopUp(this, MyLoginForm, true));
          mf.selectedIdx = dgHeaderResult.selectedIndex;
          mf.mainApp = this;
          }
          ]]>
          </mx:Script>

          <mx:VBox width="300" height="300">
          <mx:Button click="showLogin();" label="Login"/>

          <mx:DataGrid id="dgHeaderResult" width="40%" height="100%" editable="true"
          dataProvider="{resultList}" change="showLogin();">
          <mx:columns>
          <mx:DataGridColumn headerText="jipockUnionResultNo"
          dataField="jipockUnionResultNo" editable="false"/>
          <mx:DataGridColumn headerText="lineName"
          dataField="lineName" editable="false"/>
          <mx:DataGridColumn headerText="selectYN" dataField="selectYN" editable="false"/>
          </mx:columns>
          </mx:DataGrid>
          </mx:VBox>
          </mx:Application>


          this is popup codes

          <?xml version="1.0" encoding="utf-8"?>
          <mx:TitleWindow xmlns:mx=" http://www.adobe.com/2006/mxml"
          x="20" y="20" width="900" height="600"
          showCloseButton="true" close="removePop();" alpha="100">
          <mx:Script>
          <![CDATA[
          import mx.core.Application;

          import mx.events.CloseEvent;
          import mx.managers.PopUpManager;
          import mx.controls.Alert;

          [Bindable]
          public var selectedIdx:int;

          [Bindable]
          public var mainApp:Object;

          private function removePop():void {
          PopUpManager.removePopUp(this);
          }

          ]]>
          </mx:Script>
          <mx:HBox width="100%">
          <mx:Button id="btnTest" click="{Alert.show('gg');}" label="test"/>
          </mx:HBox>
          </mx:TitleWindow>

          thanx for your intention ......