flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FlexJS] About Component Cycle and Events
Date Fri, 16 Dec 2016 15:58:17 GMT
You are welcome to start another component set with the overhead to not
care about order.  For me, order matters sometimes as does making sure you
set the right booleans in the right order as parameters to a function like
addEventListener or Event's constructor.  Documentation can handle most of
this so you don't pay the price at runtime.

We also have the option of creating debug-mode beads.  These beads can
have extra code to detect problems in development then have more
streamlined versions for production.  A debug-mode ClippingViewport could
see if anyone calls any of its APIs and if not, spit out something that
says it nobody used it.

-Alex

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

>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
View raw message