title: Passing multiple values from popup in flex
body: <p>I,m able to send back a single value from custom SkinnablePopUpContainer but can't send back an Array with multiple values back to the view from which it is created ?</p>
  
  <p>Any help in how I can do so ?</p>
  
  <p>here's the code for the SkinnablePopUpContainer : I want to send back activityDetails Array</p>
  
  <p>
  
      
          
  
  <pre><code>        import spark.events.IndexChangeEvent;
  
          import valueObjects.Model;
  
          /* Variables */
  
          public var model:Model = new Model();
          private var selectCatStmt:SQLStatement;
          private var selectCatSQL:String = 'SELECT category FROM Activity GROUP BY category';
          private var activityStmt:SQLStatement = new SQLStatement();
          private var activitySQL:String = 'SELECT * FROM Activity WHERE category = :category';
  
          private var activityDetails:Array = [{category:'', activityId:0, hours:0}];  // I want to send this back to the view that creates this popup
  
          private function getCategories():void
          {
              selectCatStmt = new SQLStatement();
              selectCatStmt.sqlConnection = model.connection;
              selectCatStmt.text = selectCatSQL;
              selectCatStmt.addEventListener(SQLErrorEvent.ERROR, errorHandler);
              selectCatStmt.addEventListener(SQLEvent.RESULT, selectResult);
              selectCatStmt.execute();
          }
  
          private function selectResult(event:SQLEvent):void
          {
              var result:SQLResult = selectCatStmt.getResult();
  
              if(result.complete)
              {
                  if(result.data)
                  {
                      categoriesList.dataProvider = new ArrayCollection(result.data);
                  }
              }   
          }
  
          private function errorHandler(event:SQLErrorEvent):void
          {
              trace ("\nError message: " + event.error.message);
              trace("\nDetails: " + event.error.details);
          }
  
          /* Event Handlers */
  
          protected function categoryList_changeHandler(event:IndexChangeEvent):void
          {
              selectCatStmt = new SQLStatement();
              activityStmt.sqlConnection = model.connection;
              activityStmt.text = activitySQL;
              activityStmt.parameters[":category"] = categoriesList.selectedItem.category;
              activityStmt.addEventListener(SQLErrorEvent.ERROR, errorHandler);
              activityStmt.addEventListener(SQLEvent.RESULT, activityResult);
              activityStmt.execute();
          }
  
          private function activityResult(event:SQLEvent):void
          {
              var result:SQLResult = activityStmt.getResult();
  
              if(result.complete)
              {
                  if(result.data)
                  {
                      activitiesList.dataProvider = new ArrayCollection(result.data);
                  }
              }   
          }
  
          protected function addActButton_clickHandler(event:MouseEvent):void
          {
              activityDetails[0]["category"] = categoriesList.selectedItem.category;
              activityDetails[0]["activityId"] = activitiesList.selectedItem.id;
              activityDetails[0]["hours"] = Number(duration.text);
  
              this.close(true,activityDetails);
          }
  
          protected function skinnablepopupcontainer1_creationCompleteHandler(event:FlexEvent):void
          {
              getCategories();
          }
  
      ]]&gt;
  &lt;/fx:Script&gt;
  
  &lt;s:layout&gt;
      &lt;s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/&gt;
  &lt;/s:layout&gt;
  
  &lt;flextras:DropDownList id="categoriesList" labelField="category" width="100%" height="34" prompt="Select Type" change="categoryList_changeHandler(event)"/&gt;
  &lt;s:List id="activitiesList" itemRenderer="renderers.ActivitiesList" width="100%" height="100%"/&gt;
  &lt;s:HGroup verticalAlign="middle" horizontalAlign="left" width="100%"&gt;
      &lt;s:Label text="Activity duration in minutes : "/&gt;
      &lt;s:TextInput id="duration" width="50"/&gt;
  &lt;/s:HGroup&gt;
  &lt;s:Button id="addActButton" label="Set" click="addActButton_clickHandler(event)"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>here is popup close handler</p>
  
  <pre><code>        protected function activitySelect_closeHandler(event:PopUpEvent):void
          {
              if(!event.commit)
              {
                  return;
              }
  
              activities.push(event.data);
              trace(activities);
          }
  </code></pre>