0 Replies Latest reply on Jan 26, 2007 2:37 PM by RL2007

    Problem with Lesson "Build a distributed application with the Java adapter "

      I'm getting a compliation error with the line "public var contact:Contact;" in the code below.
      The error is "1046: Type was not found or was not a compile-time constant: Contact."

      <?xml version="1.0" ?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="initApp();">

      import mx.data.DataService;
      import mx.collections.ArrayCollection;
      import samples.contact.Contact;
      public var ds:DataService;

      public var contacts:ArrayCollection;
      public var contact:Contact;

      public function initApp():void {
      contacts = new ArrayCollection();
      ds = new DataService("contact");

      <mx:DataGrid id="dg" dataProvider="{contacts}" editable="true">
      <mx:DataGridColumn dataField="contactId" headerText="Id" editable="false"/>
      <mx:DataGridColumn dataField="firstName" headerText="First Name" />
      <mx:DataGridColumn dataField="lastName" headerText="Last Name"/>