How are you changing the classFactory? Try calling validateNow() after changing it and before you set the dataprovider.
Thanks. Actually, I have been updating (not setting or changing) the tree's dataprovider, and then changing the classFactory like this:
processesXML = event.result as XML;
nodeTreeData.source = processesXML.children();
nodeTree.allowMultipleSelection = true;
nodeTree.allowMultipleSelection = false;
I had tried using validateNow after changing the ClassFactory before but did get the error again. I will try it again but update the data provider after. Since it's an intermittent error I'm finding it hard to know if a fix is really working.
Changing just the renderer, then calling validateNow() should set a flag that flushes the freeItemRenderers. It is possible that if something else is dirty (new data for example) then other code might run before the renderers get flushed.
There is a protected method called purgeItemRenderers() that actually does the flushing. I supposed you could try subclassing and calling it directly.
Thank you. Can you point me in the right direction on how and where to call that method directly? I haven't gotten into subclassing. Can you recommend a tutorial that would be helpful? Am I subclassing the tree component or something else? Thanks again.
That is also my problem....
When I try to delete a row with itemrenderer from the datagrid, the row will be deleted. But when I try to add again a row, the property of last item renderer will not be flushed or deleted.
How to remove item renderers?