Friday, May 10, 2013

Flex Spark ViewStack Implementation

Awhile back, I created a GroupStack as a quick and dirty Spark implementation of the ViewStack I needed at the time. I've recently needed a more complete implementation of a Spark ViewStack for a project, particularly with support for deferred content creation and some of the other features left out of the GroupStack.

This version of the ViewStack is very close to a direct port, containing most all of the features and API from the Halo ViewStack. It’s based on Group (more specifically, my DeferredContentGroup which extends Group) due to my desire to substitute the contentGroup skin part (of type Group), found in many skins, with a ViewStack. The three features I did not port over is the support for history management, resizeToContent, and the usage of effect overlays. And, as with the rest of my library, it’s not that well tested, so be sure to let me know if you’re using this and you find some problems.

Source  code located at: https://www.assembla.com/code/shinynet/subversion/nodes

3 comments:

  1. Thanks, it's very handy.

    ReplyDelete
  2. I am looking for the example of using your viewstack implementation and it does not seem to be in the source code example? I really need a viewstack replacement for a flex mobile project and yours seems the best choice

    Thanks

    ReplyDelete
    Replies
    1. I didn't add an example for using the ViewStack because it has the same API as the MX ViewStack, and so should be used the same way.

      There is an example of my skinnable version (SkinnableViewStack) located at: https://www.assembla.com/code/shinynet/subversion/nodes/6/trunk/Examples/src/com/shinynet/shinylib/components/SkinnableViewStackExample.mxml

      The non skinnable version should work the same way... just not skinnable.

      Delete