Hi,

has anyone had trouble viewing properties of the Tree components data
descriptor, when debugging?

I just noticed this issue when looking at a script. The descriptor is listed
in the Variables view, but does not expand to show any properties.
I was able to recreate the issue easily enough and wondered whether it needs
reporting or not.
To test it yourself:

1. Copy and paste the following code in to a new project.
2. Put a breakpoint on line 23 (the closing bracket of the onComplete
method)
3. Run

You can see that the descriptors hasChildren is true. I also created a
variable showing the children, but still the descriptor won't expand in the
Variables view.
Seems odd. I have tried rebooting, cleaning the project etc etc. Just about
to check I have the latest debug player. Seems to consistently fail


//-----------  CODE  -----------------

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
   xmlns:mx="http://www.adobe.com/2006/mxml";
   initialize="onInit();"
   creationComplete="onComplete();">

   <mx:Script>
       <![CDATA[
           import mx.collections.ICollectionView;
           import mx.controls.treeClasses.ITreeDataDescriptor;

           [Bindable]
           public var myXML:XML;

           public function onInit():void{
               myXML = <top label="branch"><mid label='leaf' /><mid
label='leaf' /></top>;
           }

           public function onComplete():void{
               var treeDD:ITreeDataDescriptor = myTree.dataDescriptor;
               var hasChildren:Boolean = treeDD.hasChildren(myXML[0]);
               var children:ICollectionView = treeDD.getChildren(myXML[0]);
           }
       ]]>
   </mx:Script>
   <mx:Tree id="myTree" dataProvider="{myXML}" labelField="@label"
showRoot="true" />
</mx:Application>

Reply via email to