This content has been marked as final. Show 3 replies
Well, I've found something that works and it didn't even require me to abandon the automatic drag and drop functionality of the Tree control (though I'm sure it belongs in the "shameless hack" category).
The calculateDropIndex() method of the Tree class gets its data from the _dropData member of the class. _dropData.parent contains the item--in my case XML--of the index the dropIndicator is pointing to. If it is null, I know that the dropIndicator is in the root and for my purposes that's enough information. I access it from my extended Tree MXML as follows:
Hope this quick fix can be helpful to someone.
this.mx_internal::_dropData worked -beautifully-, thank you!
I'm assuming you can use this syntax to get all private attributes from internal Flex objects?
Well, I believe that the mx_internal only works on members declared as mx_internal. ie...
mx_internal var _dropData:Object;
I don't think you can use it to grab any old private variable--ie... private var _dropData:Object--but I could be wrong :) I just ran across this syntax somewhere the other day and have yet to investigate it further.