Now available: FlpTree 1.2.0
On September 16, 2008, Components,Flex - 2 CommentsFormerly known as the IKTree, FlpTree has an updated version. This new version has several bug fixes and the overall performance is improved. Changes since the last version include:
- FindNode(s) works now properly;
- Selection and multiselect now works
- Performance tweaks
- Other bugs which I forgot about
- Added open on hover
The openOnHover functionality lets a user open a node while dragging another onto it. (as proposed by Jonas Windey). Just set openOnHover on ‘true’ and set a hoverDelay.
Things to do:
- I still haven’t been able to find and fix the strange height bug. Sometimes, a node suddenly changes height, haven’t got a clue why.
- Make the creation of a renderer more user friendly. Probably with interfaces.
- Improve performance when working with huge datasets.
If you find any bugs or have feature requests or anything, just leave a comment below.
The tree now has a main download page, which can be found here. (This page is just an ad.
)
Example:
What others have to say:
Hello,
it seems as if the height problem occurs as soon as a branch is opened, closed and reopened.
But this is not my main problem. FlpTree is really great and looks and feels much better than the regular Flex Tree Component.
Unfortunately I can’t geht it to work as soon as the data comes from over AMF. AMF returns VO objects as array and I convert this to an array collection. This works with Flex Tree but not with FlpTree.
Inside my event handler I try to set the FlpTree dataProvider as ArrayCollection but nothing happens.
This is the code:
TreeMenu.dataProvider = new ArrayCollection(ArrayUtil.toArray(event.result));
Maybe anyone knows what I am doing wrong…
Instead of using the ArrayUtil class, you can just type:
TreeMenu.dataprovider = new ArrayCollection(event.result);
or (if it’s allready an array collection)
TreeMenu.dataprovider = event.result as ArrayCollection;
Note that the children property also has to be an array collection.
Do you see any nodes at all, or just the top level nodes?
Have you tried calling TreeMenu.refreshTree() ? This function forces the tree to rebuild. Not the most elegant way, I admit.
Also, you could try to use (mxml) binding for the dataprovider, instead of setting it in AS. Note that when you do use binding, it generally only works for top-level nodes in the arraycollection, updates of children do not trigger binding, so you have to call myArraycollection.refresh();.
Hope this helps!
Leave a Reply