4 Replies Latest reply on Jun 7, 2006 1:08 PM by ntsiii

    Connectivity through Xml

    RajeshBhadra Level 1
      hey can anybody tell me the difference in compiling from a flex builder and through command line compiler....

      i have a mxml app which is connected to the Xml file.. and it displays the result on the datagrid...When i compile this code and run the application it doesnt show me the results .....as in no output on the datagrid...but this same code when i run in flex builder by making a new project->mxml application and so on it shows me the results on the data grid....what exactly is happening when i compile through the command line compiler....plzz help


      mxml file
      -------------
      <?xml version = "1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="httpserv.send()">

      <mx:Script>


      import mx.collections.ArrayCollection;
      [Bindable]
      public var FriendsArray:ArrayCollection;
      </mx:Script>

      <mx:HTTPService id="httpserv" url="friends.xml"
      result="FriendsArray = new ArrayCollection(httpserv.lastResult.friends)"/>

      <mx ataGrid id="MyGrid" width="60%" height="50%" dataProvider="{FriendsArray}">
      <mx:columns>
      <mx ataGridColumn dataField = "name" headerText="Name"/>
      <mx ataGridColumn dataField = "nick" headerText="NickName"/>
      <mx ataGridColumn dataField = "mobno" headerText="Mobile Number"/>
      </mx:columns>
      </mx ataGrid>

      </mx:Application>





      xml file named friends.xml
      ----------------------------------------


      <?xml version="1.0" encoding="utf-8"?>
      <friends>
      <name>Christina Coenraets</name>
      <nick>chris</nick>
      <mobno>123456789</mobno>
      </friends>
      <friends>
      <name>Louis Freligh</name>
      <nick>louie</nick>
      <mobno>555-219-2100</mobno>
      </friends>
      <friends>
      <name>Ronnie Hodgman</name>
      <nick>ron</nick>
      <mobno>555-219-2030</mobno>
      </friends>