module - flex: relative sizing and performance -


we building flex project , render faster. have situations reference parent module size properties size current module containers, current module size properties bunch of attributes including font size , element positions , sizes.

would create temporary variables a) pcw=parentcontainer.width, pch= parentcontainer.height b) ccw=currentcontainer.width, cch=currentcontainer.height

and reference pcw,pch,ccw , cch while doing positioning. help?

also given bulk of positioning done in mxml, setting these interim variables in initialization function, allow them used in mxml such resize browser size changed. pointers

i'm not sure if you're using term "module" a generic term refer component, or if explicitly referring classes of module class.

it breaks encapsulation if container aware of it's parents. in flex, parent responsible sizing it's children; , child should never size itself.

you had code access parent's height , width:

pcw=parentcontainer.width parentcontainer.height 

i can't imagine how saving parent's height , width values speed up.

i find hard envision situation knowing parent container's width , height helpful. container has more 1 children. important know how size component has laying out it's own children, not how space parent has.

the appropriate way size , position component's children override updatedisplaylist(). updatedisplaylist() has 2 parameters: unscaledwidth , unscaledheight; is, in essence, height , width of component. should size , position component's children based on 2 values.

of course, doing relies on actionscript; not mxml.

your primary question seemed want improve performance. there many factors involved in performance of app. using actionscript layout instead of mxml 1 factor may improve performance. minimize use on binding thing can performance.

have used flex profiler? have stepped through code? doing these things determine performance issue is?


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -