0 Replies Latest reply on Sep 11, 2007 11:35 AM by kilyas2007

    Error #2044: Unhandled StatusEvent:. level=error, code=

      I am writing an application, which has a grid of addresses so that once you click a particular address you get the map displayed. But what happens is that I get the following error

      Error #2044: Unhandled StatusEvent:. level=error, code=
      The code is as follows:-
      <?xml version="1.0"?>
      <!-- dpcontrols/DataGridSort.mxml -->
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
      creationComplete="initDP();" width="100%" height="100%"

      import mx.events.DataGridEvent;
      import mx.collections.*;
      import mx.managers.PopUpManager;
      import mx.containers.Panel;
      import mx.controls.SWFLoader;
      import mx.containers.ControlBar;
      import mx.containers.Panel;
      import mx.containers.VBox;
      import mx.controls.Button;
      import mx.controls.Label;
      import mx.controls.Spacer;
      import mx.controls.TextInput;
      import mx.managers.PopUpManager;

      // Declare storage variables and initialize the simple variables.
      // The data provider collection.
      private var myDPColl:ArrayCollection;
      private var panel:Panel;

      private var myDP:Array = [
      {Address:'14, Badwin Lane', City:'carmel',
      Zip:46032, State: "IN"},
      {Address:'1786, Jackson Road', City:'Carmel',
      Zip:46032, State: "IN"},
      {Address:'231 S La Salle St', City:'Chicago',
      Zip:60604, State: "IL"},
      {Address:'233 S Wacker Dr', City:'Chicago',
      Zip:60604, State: "IL"},
      {Address:'14 E Jackson Blvd', City:'Chicago',
      Zip:60604, State: "IL"}

      //Initialize the DataGrid control with sorted data.
      private function initDP():void {
      myDPColl = new ArrayCollection(myDP);
      myGrid.rowCount=myDPColl.length +1;

      panel = new Panel();
      panel.title = "My Title";

      var cb:ControlBar = new ControlBar();
      var s:Spacer = new Spacer();
      var b1:Button = new Button();
      var b2:Button = new Button();
      b1.label = "OK";
      b1.addEventListener(MouseEvent.CLICK, closePopUp);
      b2.label = "Cancel";
      b2.addEventListener(MouseEvent.CLICK, closePopUp);
      s.percentWidth = 100;

      private function closePopUp(evt:MouseEvent):void {
      public function displayForm():void {
      PopUpManager.addPopUp(panel, this, true);
      getMap(myGrid.selectedItem.Address, myGrid.selectedItem.City, myGrid.selectedItem.State, myGrid.selectedItem.Zip);

      import mx.controls.TextInput;
      import mx.managers.PopUpManager;

      public var myArray:Array;

      private var _locLis:LocalConnection;
      private var _locSend:LocalConnection;

      // On map initialize
      private function initApp():void {
      yahooMap1.source = "yahoo/YahooMap.swf";


      // Initialize local connection
      private function initCom():void {

      _locLis = new LocalConnection();
      _locLis.client = this;
      _locSend = new LocalConnection();

      public function sendData(strMethod:String, ... args):void {
      _locSend.send("swf8Lis", strMethod, args);

      public var targetComponent:TextInput;

      private function removeMe():void {

      public function getMap( inpAddress:String, inpCity:String, inpState:String, inpZip:String):void {
      var arrAddress:Array = new Array(inpAddress, inpCity, inpState, inpZip);
      sendData("setCenterByAddressAndZoom", arrAddress.join(",") + ":~:4:~:0");

      <mx:DataGrid id="myGrid" width="100%" click="displayForm()">
      <mx:DataGridColumn minWidth="120" dataField="Address" />
      <mx:DataGridColumn minWidth="200" dataField="City" />
      <mx:DataGridColumn width="75" dataField="Zip" />
      <mx:DataGridColumn width="75" dataField="State"
      headerText="In Stock"/>

      <mx:Panel title="Yahoo! Maps" width="0%" height="0%">
      <mx:SWFLoader id="yahooMap1" showBusyCursor="true" />


      help would be appreciated