1 Reply Latest reply on Jan 8, 2009 12:58 PM by ericbelair

    How can I control Tree properties using Cairngorm MVC?

    ericbelair Level 1
      I am trying to control a few properties of a Tree component using properties in the Model.

      For instance, I have the following properties:

      public var hierarchyTreeOpenItems:Array /* of Object */ = [];
      public var hierarchyTreeSelectedItems:Array /* of Object */ = [];
      public var hierarchyTreeFirstVisibleItem:Object;

      And I reference them like so:

      <mx:Tree xmlns:mx=" http://www.adobe.com/2006/mxml"
      width="100%" height="100%" borderStyle="solid"
      selectedItems="{__model.hierarchyTreeSelectedItems}" />

      I am setting these properties in a Command triggered by the initialize Event of my Application. The openItems works, but I cannot get the Tree to select the specified items, nor can I get it to scroll to the position of the firstVisibleItem.

      Any thoughts on why this is happening and how I can get it to work?