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:

<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:

<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>
Advertisements

One thought on “The default property contents must be contiguous

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s