1 Reply Latest reply on Feb 12, 2014 7:57 AM by Patrick_Boisclair

    How can we setup a prefix namespace for a custom library in FB 4.7

    Patrick_Boisclair Level 1

      Using 3.6, we are creating a custom library.

       

      We need to be able to use a prefix such as "MyLib" when adding library components to an MXML file in an application.

      Right now we get <ns:MyButton. . .> and we need <myLib:MyMyButton . . .>. Any other library used gets <ns1:...<ns2:... etc. Not very usefull to identify the source of the component.

       

      In the library, we have the manifest.xml and design.xml. The library is functional except for the prefix.

       

      manifest.xml

      <?xml version="1.0" encoding="utf-8"?>
      <componentPackage>
                <component id="MyButton" class="com.test.MyButton"/>
      </componentPackage>
      

       

      design.xml

      <?xml version="1.0"?>
      <design version="2">
                <namespaces>
                          <namespace prefix="myLib" uri="library://flex/myLib"/>
                </namespaces>
      
                <categories>
                          <category id="MyLib" defaultExpand="true"/>
                </categories>
      
                <components>
                          <component name="MyButton" namespace="myLIb" category="MyLib" displayName="MyButton"/>
                </components>
      </design>
      

       

      When building the SWC, the assets includes the manifest.xml and design.xml files. The Namespace URL library://flex/myLib and manifest file location are also set. The compiler arguments contains -include-namespaces library://flex/myLib

       

      Is there  fix for this?

      I understand that the "design" part has been removed from 4.7, but why would it affect the mxml prefix?