1 Reply Latest reply on Feb 27, 2007 6:15 AM by Newsgroup_User

    cannot compile a mxml file

    mornglory
      I am new to Flex. I am trying to compile some of the application given in the documentation. My maim mxml file use a custom component that is defined in another mxml file. when i compile the main file i am getting an error as
      C:\resin-3.0.10\webapps\jscriptsamples\flex_swf_files\customMXMLcomp.mxml: Error
      : Could not resolve <MyComps:MycomboBox> to a component implementation.

      could anyone please tell me the solution.

      Main mxml code
      <?xml version="1.0"?>
      <!-- MyApplication.mxml -->
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns:MyComps="customcompfiles.*">
      <mx:Panel title="My Application" paddingTop="10" paddingBottom="10" paddingRight="10" paddingLeft="10">
      <MyComps:MycomboBox/>
      </mx:Panel>
      </mx:Application>

      custom comp code
      <?xml version="1.0"?>
      <!-- MyComboBox.mxm -->
      <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml">
      <mx:ComboBox>
      <mx:dataProvider>
      <mx:String>Dogs</mx:String>
      <mx:String>cats</mx:String>
      <mx:String>Mice</mx:String>
      </mx:dataProvider>
      </mx:ComboBox>
      </mx:VBox>
        • 1. Re: cannot compile a mxml file
          Level 7
          mornglory,

          In your <mx:Application> tag the xmlns:MyComps attribute should point to
          the path where your custom component is. Meaning, the compiler is looking
          for your MyComps elements inside a subfolder called customcompiles. If your
          custom component is in the same folder as your app just call it as:
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns:MyComps="*">

          JG


          "mornglory" <webforumsuser@macromedia.com> wrote in message
          news:es14bv$7p9$1@forums.macromedia.com...
          >I am new to Flex. I am trying to compile some of the application given in
          >the
          > documentation. My maim mxml file use a custom component that is defined in
          > another mxml file. when i compile the main file i am getting an error as
          > C:\resin-3.0.10\webapps\jscriptsamples\flex_swf_files\customMXMLcomp.mxml:
          > Error
          > : Could not resolve <MyComps:MycomboBox> to a component implementation.
          >
          > could anyone please tell me the solution.
          >
          > Main mxml code
          > <?xml version="1.0"?>
          > <!-- MyApplication.mxml -->
          > <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
          > xmlns:MyComps="customcompfiles.*">
          > <mx:Panel title="My Application" paddingTop="10" paddingBottom="10"
          > paddingRight="10" paddingLeft="10">
          > <MyComps:MycomboBox/>
          > </mx:Panel>
          > </mx:Application>
          >
          > custom comp code
          > <?xml version="1.0"?>
          > <!-- MyComboBox.mxm -->
          > <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml">
          > <mx:ComboBox>
          > <mx:dataProvider>
          > <mx:String>Dogs</mx:String>
          > <mx:String>cats</mx:String>
          > <mx:String>Mice</mx:String>
          > </mx:dataProvider>
          > </mx:ComboBox>
          > </mx:VBox>
          >