I have a component library. It has a manifest file that looks like this:
This used to work:
Create a file called design.xml
in your /src folder:
<?xml version="1.0" ?>
<design>
<namespaces>
<namespace prefix="mangos" uri="http://com.mangofactory.sample/mxml/2010" />
</namespaces>
</design>
Create a file called manifest.xml
in your /src folder:
<componentPackage>
<component id="MyClass" class="com.mangofactory.framework.MyClassTag"/>
</componentPackage>
Configure your Namespace URL, etc in the build properties:
This is supposed to cause flash builder to prompt as follows:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:mangos="http://com.mangofactory.sample/mxml/2010">
<fx:Declarations>
<mangos:MyClass />
</fx:Declarations>
</s:Application>
(Note that the class appears as MyClass
instead of MyClassTag
, and the namespace appears as mangos
)
However, I just tried doing this, and although the class was renamed correctly, the namespace appeared up as ns
. I know this used to work in FB3.x, maybe I've either forgotten a step, or FB4.5 has broken it.
If you just change xmlns:ns
to xmlns:e
or xmlns:foo
then the MXML parser will pick up on the change. It's not all that difficult to change, and I don't think there is a way to change how it generates namespaces by default.