could you post a little example which makes it possible to see the problem?
1 person found this helpful
this might do the trick:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:components="components.*">
private function handleDoubleClick(evt:Event):void
var le:ListEvent = new ListEvent("itemEditBegin");
le.reason = "dClick";
le.rowIndex = evt.currentTarget.selectedIndex;
private function handleItemEditBegin(evt:ListEvent):void
if (evt.reason != "dClick")
Thank you for your reply and sample code. It partly works. It no longer enters edit mode upon a single click.
However, I keep getting error 1009 on line 2603 of List.as, inside the function itemEditorItemEditBeginHandler(event:ListEvent). It is expecting a value for .rowIndex in an object called _editedItemPosition.
I have even tried creating and setting the object prior to dispatching the event, but it remains null. Either my code isn't being received or something resets it to null after it runs. I used this code in the beginning of the handleDoubleClick function:
var objEIP:Object=new Object; objEIP.rowIndex=event.currentTarget.selectedIndex; objEIP.columnIndex=0; treePrimaryListManager.editedItemPosition=objEIP;
"treePrimaryListManager" is the Tree component I am working with in this code.
You should debug your second line of code and see what currentTarget is. In my example, evt is a regular MouseEvent.
Also, in your code, you refer explicitly to your tree component (treePrimaryListManager). Doing this makes the code not suitable for re-use on other list components you may use in your app.
Try to isolate the problem and post the entire code so I can look into it.
Thank you for your further assistance and input.
currentTarget is my Tree.
I am not concerned about reusability of this single line of code.
The problem is isolated to immediately after the dispatchEvent(le) is executed. I cannot post the entire application code.
After my last post I found an alternative solution to my problem.