Archive for the 'Design View' Category
Multiple sets of visual children have been specified for the component tag
Multiple sets of visual children have been specified for the component tag.
You have contents in the default property of a container but also defined in the custom component. Remove the contents of the component instance and if need be move it into the component mxml file.
XML:
No comments
-
<!-- Incorrect - notice the rectangle inside the component instance -->
-
<local:CustomComponent x="135" y="9" width="457" height="340">
-
<s:Rect width="100%" height="100%">
-
<s:fill>
-
<s:SolidColor color="#dddddd"/>
-
</s:fill>
-
</s:Rect>
-
</local:CustomComponent>
-
-
<!-- Correct - rectangle is defined in the component -->
-
<local:CustomComponent x="135" y="9" width="457" height="340" />
The default property contents must be contiguous
The default property contents must be contiguous
When in Design View in Flex 4 you must keep the visual design MXML code together. Having a Script block right in the middle of it will create this error.
Incorrect:
XML:
-
<?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">
-
-
<!-- Visual markup code -->
-
<s:TextInput x="26" y="134" id="code1" width="302" text="Status of Mic"/>
-
-
<!-- Script tag interrupts and is located in the middle of visual markup code -->
-
<fx:Script>
-
<![CDATA[
-
private var swfpgno:int = 1;
-
]]>
-
</fx:Script>
-
-
<!-- Visual markup code -->
-
<s:TextInput x="26" y="77" id="mic1" width="302"/>
-
</s:Application>
Correct:
XML:
No comments
-
<?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">
-
-
<!-- Script tag does not interrupt flow of design view code -->
-
<fx:Script>
-
<![CDATA[
-
private var swfpgno:int = 1;
-
]]>
-
</fx:Script>
-
-
<!-- Design View visual markup is in a continuous block -->
-
<s:TextInput x="26" y="134" id="code1" width="302" text="Status of Mic"/>
-
<s:TextInput x="26" y="77" id="mic1" width="302"/>
-
-
</s:Application>