I see it now.  That may be a bug. Report it at http://www.macromedia.com/go/wish

 

Maybe someone else will have some suggestions.

 

Tracy

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mika Kiljunen
Sent: Friday, May 27, 2005 3:30 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Tree change event

 

Hi, I forgot to mention that the tree has dragEnabled=”true”, which makes this “lost event” occur…. It also seems that it doesn’t send any of these events either on when clicked with CTRL down:

dragEnter

dragExit

dragOver

dragDrop

dragComplete

 

 

-Mika

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Tracy Spratt
Sent: 26. toukokuuta 2005 19:45
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Tree change event

 

I don’t see that behavior.  Try the sample app below.  Select a node, the node label will display in the Label field below. CTRL-click that node to deselect, and the Label control becomes empty.

Tracy

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" width="600" height="400">

 

<mx:Script><![CDATA[

            // Variable that contains the data provider.

            var myDP : Array;

            // Function to initialize the data provider.             

            function initTree() {

                        myDP = new Array();

                        myDP.addItem({label:"one"});

                        myDP.addItem({label:"two"});

                        myDP.addItem({label:"three"});

                        myTree.dataProvider = myDP;

            }

           

            private function onChange(oEvent:Object):Void

            {

                        lblSelectedNode.text = oEvent.target.selectedNode.getProperty("label");

            }

]]></mx:Script>

 

<mx:Tree id="myTree" initialize="initTree()" change="onChange(event)"/>

<mx:Label id="lblSelectedNode" />

                       

</mx:Application>

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mika Kiljunen
Sent: Thursday, May 26, 2005 3:15 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Tree change event

 

Hi,

 

I noticed that the tree’s change event does not work as expected ( the same way as for example in DataGrid ). When a user selects a node on a tree, the tree sends change event properly, as in DataGrid. But when the user deselects (is that a word?) a node by clicking it with CTRL –key down, it does not send change event (as datagrid does). This causes real problems, since I get no info that the there are no nodes now selected ( as user has done something I can not follow) and my buttons that should be disabled when no nodes are selected, stay enabled -> leads to errors.

 

Is there a fix or a nice workaround on this issue?

Is this a feature or a bug in the Tree?

 

 

--
Mika Kiljunen
Ohjelmistosuunnittelija / Intensium Oy
[EMAIL PROTECTED]ium.fi

GSM: +358 50 352 4842

 

 

 

 

 

 

 



Yahoo! Groups Links

Reply via email to