Flex - Script tag - red code in inline item renderers
Permanently deleted user
创建于
The <Script> tag always appears red in inline item renderers. I have been experiencing this with both Flex 3 and 4 SDKs. Can I do something about it, or just wait for a fix? :)
Thank you. I'm afraid you need to wait for the fix. Fortunately EAP builds are released almost every week. Please open an issue http://youtrack.jetbrains.net/ And please paste an example for Flex3 also.
Please attach sample screenshot or full code example. Couldn't reproduce so far.
<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">
<fx:Declarations>
<fx:XMLList id="employees">
<employee>
<name>Christina Coenraets</name>
<phone>555-219-2270</phone>
<email>ccoenraets@fictitious.com</email>
<active>true</active>
</employee>
<employee>
<name>Joanne Wall</name>
<phone>555-219-2012</phone>
<email>jwall@fictitious.com</email>
<active>false</active>
</employee>
</fx:XMLList>
</fx:Declarations>
<s:VGroup left="10" right="10" top="10" bottom="10">
<mx:DataGrid id="dg" width="100%" height="100%" rowCount="5" dataProvider="{employees}">
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="Name"/>
<mx:DataGridColumn dataField="phone" headerText="Phone"/>
<mx:DataGridColumn dataField="email" headerText="Email"/>
<mx:DataGridColumn dataField="active" headerText="Active">
<mx:itemRenderer>
<fx:Component>
<s:MXDataGridItemRenderer>
<fx:Script><![CDATA[
import mx.controls.Alert;
private function clickHandler() : void {
Alert.show("Click");Header 1
}
]]></fx:Script>
<s:layout>
<s:HorizontalLayout paddingLeft="10"/>
</s:layout>
<s:CheckBox click="clickHandler()"/>
</s:MXDataGridItemRenderer>
</fx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
</s:VGroup>
</s:Application>
Thank you. I'm afraid you need to wait for the fix. Fortunately EAP builds are released almost every week. Please open an issue http://youtrack.jetbrains.net/
And please paste an example for Flex3 also.