apache / royale-asjs

Apache Royale ASJS
Apache License 2.0
372 stars 116 forks source link

Multiple issues with mx:Tree ( during dynamic updates with XML) #1198

Open greg-dove opened 2 years ago

greg-dove commented 2 years ago

Attached is both a Flex reference example (which works) and the current royale emulation of the same, which demonstrates the issues.

Also see the commit discussion thread at: https://github.com/apache/royale-asjs/commit/acab343f73b939bb3b28a13f9142cba4f799104a

(It is currently possible to enter an infinite loop when opening nodes using the royale example)

Additional Info I will continue to work on unit tests for XML.notification, I believe I was seeing a case in swf where instead of "nodeAdded" here (https://github.com/apache/royale-asjs/blob/649ab783845b4e371b34e182fb6fae5e2574cb1d/frameworks/projects/XML/src/main/royale/XML.as#L2911) it was sending "nodeChanged" instead. I do have a local unit test for this, but I will improve the accuracy of the unit testing as well, because the trackChanges stringification in the current version is less than adequate.

(separate folders in the zip file for flex and royale - each contains a single mxml Application file) mxTree_Issue.zip

greg-dove commented 2 years ago

I have 'resolved' this issue locally and will work over the coming weekend to a) explain the issues and b) create a branch for others to test with if there is sufficient interest in doing that before merging. As part of the work on this, I figured out why there are certain cases of infinite loops in XML notifications, for example, and I will explain that.

greg-dove commented 2 years ago

@estanglerbm in particular I would welcome your input on this if you are available/inclined to do so, as you pretty much kicked things off here... and I am not sure why you weren't seeing some of the issues I was seeing, because I assume you are using dynamic Tree stuff somewhere in your code. Hopefully you might have a chance to try the changes against whatever codebase you are working on and provide additional feedback.

greg-dove commented 2 years ago

Sorry, I will need a few more days before I can follow through on this. I suspect it will be the next weekend now.

estanglerbm commented 2 years ago

I'll try to provide input. I just noticed updates on this issue (not getting email about it for whatever reason).