Adobe Flex ItemRenderer: Making Calculations
问题 I have a database including a user's Date of Birth, but I want to display their age. I have a function which calculates the age but I cannot use it in the ItemRenderer and I don't know why. I don't think it will work if I use this code outside of the ItemRenderer. The DOB is accessed by {data.dob} . Here's my code: <s:GridColumn dataField="age" headerText="Age" width="80"> <s:itemRenderer> <fx:Component> <s:GridItemRenderer> <fx:Script> <![CDATA[ // Retrieving the user's DOB var dateStr