与每次渲染组件时发生的creationComplete
类似的呼叫是什么?每次组件渲染时,我都想重新运行一个函数(它必须发出HTTP请求,但每次调用的url都会发生更改),我无法弄清楚如何执行此操作。在组件重新呈现时触发的flex事件?
对于背景:
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
creationComplete="loadGallery()">
private function loadGallery():void {
var src:String = "http://localhost:3000/car_type/" + UserPreference.getInstance().carType.toString() + ".xml";
Alert.show(src);
httpService.url = src;
httpService.send();
}
基于Docs,这听起来像是在渲染组件之前调度渲染器事件,而原始海报想要在渲染渲染之后运行代码。我不清楚这是否适用于原始海报。在Flex的上下文中,我相信他正在寻找updateComplete。 – JeffryHouser
肯定地说,谢谢你指出 –