flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yishay Weiss <yishayj...@hotmail.com>
Subject RE: [FlexJS] About Component Cycle and Events
Date Fri, 16 Dec 2016 10:33:55 GMT
I checked [1] and



                                         <js:List id="myContainer1" y="20" x="20">

                                                       <js:beads>

                                                                    <js:ListView/>

                                                                    <js:ClippingViewport/>

                                                       </js:beads>

                                         </js:List>



Does behave differently than



                                         <js:List id="myContainer2" y="20" x="120">

                                                       <js:beads>

                                                                    <js:ClippingViewport/>

                                                                    <js:ListView/>

                                                       </js:beads>

                                         </js:List>



Personally, I find this confusing. I think if we can avoid dependency on order it’s better.
We can either go with Peter’s  suggested BeadBase, or simply stress in documentation that
loading partner beads on set bead() is discouraged.



This [2] is even worse in my opinion. The scrolling viewport doesn’t get loaded at all,
because titlebar loads the view, which loads the viewport before it’s been specified.



[1] https://paste.apache.org/KJYg

[2] https://paste.apache.org/JU94





From: Alex Harui<mailto:aharui@adobe.com>
Sent: Thursday, December 15, 2016 7:38 PM
To: dev@flex.apache.org<mailto:dev@flex.apache.org>
Subject: Re: [FlexJS] About Component Cycle and Events




On 12/15/16, 12:01 AM, "Yishay Weiss" <yishayjobs@hotmail.com> wrote:

>I see your point about overrides. It looks like set strand() is not the
>place to load partner beads. If that’s the case, is it a bug that
>ContainerView.strand calls createViewport() which loads the model and the
>viewport?
>

I purposefully chose terms like beads and strands because order matters,
otherwise I probably would have chosen something like rice and nigiri.  If
you plan to override the Viewport, you have to put it on the strand first.
 Beads specified in MXML are loaded before View beads.  So the strandutils
code is useful in many cases in a strand setter, but not all and I think
you will need to use an event to know when to run it.

-Alex


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message