flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tintin <1955.mille.mig...@googlemail.com>
Subject RE: How Should I Dynamically Switch Component?
Date Tue, 14 Oct 2014 10:02:50 GMT
Hello Mark

Ok I have got it working with a very neat and simple solution.

In my MXML component I call a function in my 'Presenter' from the
onCreationComplete event:



In my ActionScript class I get a reference to the currentTarget, using the
event argument, and set a variable:



Now I can simply change the 'currentState' property of my _view property
like this:



Back in the View MXML component the 'includeIn' properties now cause the
different components to appear or not depending on the currentState of my
_view property.

It works a treat!



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/How-Should-I-Dynamically-Switch-Component-tp8378p8399.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Mime
View raw message