How flex itemRenderer works ? (their life cycle)

我是研究僧i 提交于 2019-12-13 20:12:37

问题


By works, i mean : how item renderer are instanciate , call , destroy... what is theire life cycle ?

I had some display bugs, and this link open my mind to the problem http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=cellrenderer_072_14.html

( the doc is the same for flex3 )

But i want to know more. Any links or knowledge to share ?


回答1:


Peter Ent wrote a series of blog posts on item renderers that is extremely useful:

itemRenderers: Part 1: inline renderers

http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html

itemRenderers: Part 2: External renderers

http://www.adobe.com/devnet/flex/articles/itemrenderers_pt2.html

itemRenderers: Part 3: Communication

http://www.adobe.com/devnet/flex/articles/itemrenderers_pt3.html

itemRenderers: Part 4: States and Transitions

http://www.adobe.com/devnet/flex/articles/itemrenderers_pt4.html

itemRenderers: Part 5: Efficiency

http://www.adobe.com/devnet/flex/articles/itemrenderers_pt5.html




回答2:


Check this out : http://sites.google.com/site/iamfuric/Home/Flex/about-itemrenderer source code is available :)




回答3:


I'd say that link explains what you need to do: Don't ever assume state, and expect your itemrenderer to be reused for multiple items (so don't store data for one item at object level in the itemrenderer, only use variables inside your function)



来源:https://stackoverflow.com/questions/925889/how-flex-itemrenderer-works-their-life-cycle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!