Archive for March, 2010
Invalid component name ‘default’: component name must be legal ActionScript class name.
Invalid component name ‘default’: component name must be legal ActionScript class name. default.css
You cannot name a class or css file a reserved keyword such as, “if”, “else”, “switch”, “default”, etc
Incorrect filename:
default.css
Correct filename
styles.css
” declaration must be contained within the tag, since it is not assignable to the default property’s element type ‘mx.core.IVisualElement’.
” declaration must be contained within the <Declarations> tag, since it is not assignable to the default property’s element type ‘mx.core.IVisualElement’.
This is interesting! I pasted code in an ichat window then copied it out and pasted it back into the MXML application file. After that I started getting the error mentioned here. It turns out there are hidden invisible characters that are incompatible with the compiler.
So to fix this problem I had to erase the white space near where the error was. This fixed the problem. NOTE: It may be the error is on the line above or line below where it is being reported.
No commentsReferenceError: Error #1069: Property leadingModel not found on String and there is no default value.
ReferenceError: Error #1069: Property leadingModel not found on String and there is no default value.
at flashx.textLayout.elements::LinkElement/computeLinkFormat()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\elements\LinkElement.as:437]
Incorrect Code:
-
<s:RichEditableText x="92" y="22" color="#2b4381" editable="false" fontFamily="Myriad Pro" fontSize="17" whiteSpaceCollapse="preserve">
-
<s:textFlow>
-
<s:TextFlow>
-
<s:linkActiveFormat>
-
</s:linkActiveFormat>
-
<s:p>
-
<s:a href="http://google.com"><s:span color="#f77d0e" textDecoration="none">link</s:span></s:a>
-
</s:p>
-
</s:TextFlow>
-
</s:textFlow>
-
</s:RichEditableText>
Correct:
-
<s:RichEditableText x="92" y="22" color="#2b4381" editable="false" fontFamily="Myriad Pro" fontSize="17" whiteSpaceCollapse="preserve">
-
<s:textFlow>
-
<s:TextFlow>
-
<s:p>
-
<s:a href="http://google.com"><s:span color="#f77d0e" textDecoration="none">link</s:span></s:a>
-
</s:p>
-
</s:TextFlow>
-
</s:textFlow>
-
</s:RichEditableText>
TypeError: Bad element of type int passed to mxmlChildren at flashx.textLayout.elements::FlowGroupElement/set mxmlChildren
TypeError: Bad element of type int passed to mxmlChildren
at flashx.textLayout.elements::FlowGroupElement/set mxmlChildren()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\elements\FlowGroupElement.as:203]
I using data binding and I passed a integer inside a span tag as shown below. To fix it I had to cast it or convert it to a string.
-
<s:RichEditableText x="20" y="100" color="#2b4381" editable="false" fontFamily="Myriad Pro" fontSize="17" width="494" height="55" whiteSpaceCollapse="preserve">
-
<s:textFlow>
-
<s:TextFlow>
-
<s:p>
-
<s:a href="http://google.com" color="#ffffff" textDecoration="none"> {data.contentCount} </s:a></s:p>
-
</s:TextFlow>
-
</s:textFlow>
-
</s:RichEditableText>
Correct:
-
<s:RichEditableText x="20" y="100" color="#2b4381" editable="false" fontFamily="Myriad Pro" fontSize="17" width="494" height="55" whiteSpaceCollapse="preserve">
-
<s:textFlow>
-
<s:TextFlow>
-
<s:p>
-
<s:a href="http://google.com" color="#ffffff" textDecoration="none"> {String(data.contentCount)} </s:a></s:p>
-
</s:TextFlow>
-
</s:textFlow>
-
</s:RichEditableText>
TypeError: Bad element of type flashx.textLayout.elements::LinkElement passed to mxmlChildren
TypeError: Bad element of type flashx.textLayout.elements::LinkElement passed to mxmlChildren
at flashx.textLayout.elements::SpanElement/set mxmlChildren()[C:\Vellum\branches\v1\1.0\dev\output\openSource\textLayout\src\flashx\textLayout\elements\SpanElement.as:209]
at Test/_Test_SpanElement1_c()[/Users/monkeypunch/Documents/test/src/Test.mxml:5]
Incorrect:
-
<s:RichText x="20" y="100" color="#2b4381" fontFamily="Myriad Pro" fontSize="17" tabStops="S0 S50 S100 S150 S200 S250 S300 S350 S400 S450 S500" width="494" height="55" whiteSpaceCollapse="preserve">
-
<s:content><s:p><s:span color="#f77d0e"><s:a href="http://google.com">{data.username}</s:a></s:span><s:span> </s:span><s:span color="#ffffff">posted 18 photos to</s:span><s:span> </s:span><s:span color="#0693ab">Web 2.0 Silicon Valley Design Team</s:span></s:p></s:content>
-
</s:RichText>
Correct: LinkElements cannot be children of span tags. Move the span inside of the link element or copy the attributes from the span to the link.
-
<s:RichEditableText x="20" y="100" color="#2b4381" editable="false" fontFamily="Myriad Pro" fontSize="17" width="494" height="55" whiteSpaceCollapse="preserve">
-
<s:textFlow>
-
<s:TextFlow>
-
<s:p><s:a href="http://google.com"><s:span color="#f77d0e" textDecoration="none">{data.username}</s:span></s:a><s:span color="#ffffff"> posted 18 photos to</s:span><s:span> </s:span><s:span color="#0693ab">Web 2.0 Silicon Valley Design Team</s:span></s:p>
-
</s:TextFlow>
-
</s:textFlow>
-
</s:RichEditableText>
The dependency spark.components.Button from /Applications/Adobe Flash Builder 4/sdks/4.0.0/frameworks/libs/spark.swc has a minimum supported version of 4.0.0, which is higher than the compatibility version, 3.0.0.
The dependency spark.components.Button from /Applications/Adobe Flash Builder 4/sdks/4.0.0/frameworks/libs/spark.swc has a minimum supported version of 4.0.0, which is higher than the compatibility version, 3.0.0.
Problem
The "Use Flex 3 Compatibility mode" flag is checked in the Flash Builder compiler settings and conflicts with the Flex SDK version you have chosen. Read more here... http://opensource.adobe.com/wiki/display/flexsdk/Compatibility+Mode+SWC+Policy+(Mini+Specification)
Solution
Turn off this option in the Flex Compiler settings by unchecking this box in your project. Easy...
Initializer for ‘dataProvider’: values of type mx.collections.IList cannot be represented in text.
Initializer for 'dataProvider': values of type mx.collections.IList cannot be represented in text.
Problem
The problem is we are not enclosing the reference to array collection with curly braces. The list component thinks that we are passing a string. So changing from "myData" to "{myData}".
Incorrect code:
-
<fx:Declarations>
-
-
<s:ArrayCollection id="myData">
-
<s:source>
-
<fx:Object label="Engineering" data="ENG"/>
-
<fx:Object label="Product Management" data="PM"/>
-
<fx:Object label="Marketing" data="MKT"/>
-
</s:source>
-
</s:ArrayCollection>
-
</fx:Declarations>
-
-
<s:List dataProvider="myData" x="10" y="10" width="575" height="297" skinClass="ActivityStreamSkin"></s:List>
Solution
-
<s:List dataProvider="{myData}" x="10" y="10" width="575" height="297" skinClass="ActivityStreamSkin"></s:List>