When I try to access components that are in a different state on the
line after I set the current state I get this error,
TypeError: Error #1009: Cannot access a property or method of a null
object reference.

// code
currentState = NOTES;
noteComponent.text = value; // noteComponent exists in NOTES state and
is not created yet

I know this is because of the Flex invalidation cycle and I'm aware I
could use databinding and I know I could use callLater. But if I
needed to create the components immediately for only the state I'm
going to how would I do that?

Custom Component:

<State 1>
<State 2>
<State 3>

<imageComponent includeIn="State 1"/>
<videoComponent includeIn="State 2"/>
<noteComponent includeIn="State 3"/>



Reply via email to