I have updated my Flex security component called Chimp. I was working on implementing a suggestion to use the includeInLayout property instead of removing children, and found a number of issues in the process. I have expanded the sample application to help test the component. Also, it should give a pretty good picture of how the component works.
Here is what has changed since the last post:
- Replaced the “remove” action with “removeFromLayout” & “removeChild” actions
- removeFromLayout: This property use the includeInLayout property to remove components from view. This is preferred over the ‘removeChild’ action, but will not work in all cases (like TabNavigator tabs).
- removeChild: This removes the child from the parent.
- Update the component so it updates the view on any permission changes. So, it no longer require that permissions are loaded and set before the Chimp is loaded. The Chimp still needs to be added before the protected components are added because they are tracked with an event listener on the add to stage system event.
Please let me know if anyone else has suggestions on how to improve the component…








