On 12/14/16, 10:42 AM, "yishayw" <[email protected]> wrote:

>Peter Ent wrote
>> If your bead needs to know another bead exists, typically a view bead,
>> then in the strand-setter, ask for that bead using
>>strand.getBeadByType().
>> If it comes back, then you are good to proceed, but if you get null,
>>then
>> set up an event listener for viewChanged (or whatever event makes sense
>> for you). Then in the deferred setup, continue as you would now that the
>> bead you seek is present.
>
>Is there a reason not to proactively load the beads you need? If you use
>org.apache.flex.utils.StrandUtils.loadBead(), you can be assured that the
>bead has been loaded and retain a synchronous flow.
>

IMO, proactive is not PAYG.  Don't do things just-in-case, do them
just-in-time.  In some future world, we may not load interaction beads
(mouse handling and keyboard handling) until after the first screen is
visible.  Give the user something to look at, they will need at least
250ms to react to it.  No need to initialize interaction until there is
something to interact with, IMO.

My 2 cents.
-Alex

Reply via email to