This is an automated email from the ASF dual-hosted git repository. gregdove pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 3c590da3f01d94edab2cf3dcfeaee248c7a09f63 Author: greg-dove <[email protected]> AuthorDate: Wed Jul 3 20:05:53 2019 +1200 Minor tweaks, avoid double checking for 'comp is IMXMLDocument' sometimes in MXMLDataInterpreter --- .../src/main/royale/org/apache/royale/core/IStrand.as | 6 +++--- .../org/apache/royale/utils/MXMLDataInterpreter.as | 19 +++++++------------ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IStrand.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IStrand.as index c8832eb..d3791e6 100644 --- a/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IStrand.as +++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/core/IStrand.as @@ -39,7 +39,7 @@ package org.apache.royale.core /** * Add a bead to the strand. * - * @param bead The bead to be added. + * @param bead The bead (IBead instance) to be added. * * @langversion 3.0 * @playerversion Flash 10.2 @@ -49,7 +49,7 @@ package org.apache.royale.core function addBead(bead:IBead):void; /** - * Find a bead on the strand. + * Find a bead (IBead instance) on the strand. * * @param classOrInterface The class or interface to use * to search for the bead @@ -65,7 +65,7 @@ package org.apache.royale.core /** * Remove a bead from the strand. * - * @param IBead bead The bead to be removed. + * @param bead The bead (IBead instance) to be removed. * * @langversion 3.0 * @playerversion Flash 10.2 diff --git a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/MXMLDataInterpreter.as b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/MXMLDataInterpreter.as index 7b3dffd..4d53935 100644 --- a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/MXMLDataInterpreter.as +++ b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/MXMLDataInterpreter.as @@ -295,25 +295,20 @@ public class MXMLDataInterpreter if (comp is IDocument) comp.setDocument(document, id); + var knownIMXMLDoc:Boolean; var children:Array = data[i++]; if (children && comp is IMXMLDocument) { - comp.setMXMLDescriptor(document, children); - } - COMPILE::SWF - { - if (parent && comp is IChild) - parent.addElement(comp as IChild, !(parent is IContainer)); - } - COMPILE::JS - { - if (parent && comp is IChild) - parent.addElement(comp as IChild, !(parent is IContainer)); + comp.setMXMLDescriptor(document, children); + knownIMXMLDoc = true; } + + if (parent && comp is IChild) + parent.addElement(comp as IChild, !(parent is IContainer)); if (children) { - if (!(comp is IMXMLDocument)) + if (!(knownIMXMLDoc || comp is IMXMLDocument)) { generateMXMLInstances(document, comp as IParent, children); }
