PROBLEM:

The problem occur when shifting from Source to Design mode in Flash Builder 4.

Error says:

The default program must be contiguous



SOLUTION AND CAUSE:

This is cause by script blocks added on the middle of the visual designs.

Sample:

<s:windowedapplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark">
 <s:TextInput x="100" y="100" id="test1" width="302"/>
 
 <fx:script>
  
 </fx:script>
 
 <s:TextInput x="100" y="200" id="test2" width="302"/>


The sample above will cause an error since we place script blocks between the visual components. To fix this you can do this:

<s:windowedapplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark">
 <fx:script>
  
 </fx:script>

 <s:TextInput x="100" y="100" id="test1" width="302"/> 
 <s:TextInput x="100" y="200" id="test2" width="302"/>

No comments :

Post a Comment