If you have a labelFunction, you'll probably need a custom itemEditEnd
handler as we have no idea how to write out the edited data back into
the node.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andriy Panas
Sent: Tuesday, April 22, 2008 7:36 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Inline Tree's node name editing creates visible
empty nodes in a Tree when "labelFunction" property is set

 

Hi Flexcoders,

Steps to reproduce:

1. Compile this file
------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> "
applicationComplete="onCreationComplete()">
<mx:Script>
<![CDATA[
import mx.collections.XMLListCollection;
import mx.controls.Alert;
import mx.events.FlexEvent;

private var companyXML:XML =

<list>
<project name="Finance" code="200">
<presentation name="John H"/>

<presentation name="Sam K"/>
</project>
<project name="Operations" code="400">

<presentation name="Bill C"/>
<presentation name="Jill W"/>
</project>
<project name="Engineering" code="300">
<presentation name="Erin M"/>
<presentation name="Ann B"/>
</project>
</list>;

private function onCreationComplete() : void {
testTree.dataProvider = new XMLListCollection(companyXML.children())
}

private function displayPresentationTreeItem(item : XML) : String {
return [EMAIL PROTECTED];
}

]]>
</mx:Script>
<mx:Tree id="testTree"
width="100%"
height="100%"
editable="true"
labelFunction="displayPresentationTreeItem">
</mx:Tree>
</mx:Application>
------------------------------------

2. Expand any tree node

3. Click on tree node name and enter a new name. Hit Enter key to save
changes

Actual Results:
-----------------------
1. Empty tree nodes are added to the tree

Expected Results:
-----------------------
2. New tree node name entered is displayed in a tree

What do I do wrong?

ps
I had filled a bug at Adobe JIRA bug-database:
https://bugs.adobe.com/jira/browse/SDK-15339,
<https://bugs.adobe.com/jira/browse/SDK-15339,> 
so far no response there.
-- 
--
Med venlig hilsen / Best regards
Andriy Panas
[EMAIL PROTECTED] <mailto:a.panas%40gmail.com> 

 

Reply via email to