You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2020/02/16 21:26:57 UTC
[royale-asjs] branch develop updated (b96bd56 -> a6fc210)
This is an automated email from the ASF dual-hosted git repository.
gregdove pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.
from b96bd56 FileReference example
new 51badf7 minor reflection improvements - explicit class inclusion, and reflection caching is immediate on bead instantiation
new a6fc210 Fix for possible application startup issues with class aliases. ClassAliasBead is now processed in mxml declaration order if used in mxml. This resolves issues when subsequent beads expect aliases to already be available during their instantiation phase.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../Reflection/src/main/royale/ReflectionClasses.as | 1 +
.../apache/royale/reflection/beads/ClassAliasBead.as | 19 ++++++++++++++++++-
.../reflection/beads/ReflectionCacheEnabledBead.as | 2 +-
3 files changed, 20 insertions(+), 2 deletions(-)
[royale-asjs] 02/02: Fix for possible application startup issues
with class aliases. ClassAliasBead is now processed in mxml declaration
order if used in mxml. This resolves issues when subsequent beads expect
aliases to already be available during their instantiation phase.
Posted by gr...@apache.org.
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 a6fc210ba842e4245e6b4d1436828f5cde0bf274
Author: greg-dove <gr...@gmail.com>
AuthorDate: Mon Feb 17 10:26:29 2020 +1300
Fix for possible application startup issues with class aliases.
ClassAliasBead is now processed in mxml declaration order if used in mxml. This resolves issues when subsequent beads expect aliases to already be available during their instantiation phase.
---
.../apache/royale/reflection/beads/ClassAliasBead.as | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ClassAliasBead.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ClassAliasBead.as
index 81fb0d0..3ea5bc6 100644
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ClassAliasBead.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ClassAliasBead.as
@@ -32,6 +32,7 @@ package org.apache.royale.reflection.beads
import org.apache.royale.core.IBead;
import org.apache.royale.core.IFlexInfo;
import org.apache.royale.core.IStrand;
+ import org.apache.royale.core.IDocument;
/**
* The ClassAliasBead class is the registers class
@@ -45,7 +46,7 @@ package org.apache.royale.reflection.beads
* @playerversion AIR 2.6
* @productversion Royale 0.0
*/
- public class ClassAliasBead implements IBead
+ public class ClassAliasBead implements IBead, IDocument
{
/**
* Constructor.
@@ -73,6 +74,7 @@ package org.apache.royale.reflection.beads
*/
public function set strand(value:IStrand):void
{
+ if (_strand == value) return;
_strand = value;
var app:IFlexInfo = value as IFlexInfo;
var info:Object = app.info();
@@ -88,6 +90,21 @@ package org.apache.royale.reflection.beads
}
}
}
+
+ /**
+ * the following ensures that ClassAliasBead will be processed in mxml bead declaration order,
+ * before other subsequent application beads which can run code that requires class aliases
+ * for example :
+ * a model bead that is set up from its instantiation based on deserialization (using class aliases) of content from local storage
+ * @private
+ * @royaleignorecoercion org.apache.royale.core.IStrand
+ */
+ public function setDocument(document:Object, id:String = null):void
+ {
+ if (document is IStrand) {
+ strand = IStrand(document);
+ }
+ }
}
[royale-asjs] 01/02: minor reflection improvements - explicit class
inclusion, and reflection caching is immediate on bead instantiation
Posted by gr...@apache.org.
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 51badf746ebdb28df4bdbf344fee070213d1365d
Author: greg-dove <gr...@gmail.com>
AuthorDate: Mon Feb 17 10:23:58 2020 +1300
minor reflection improvements - explicit class inclusion, and reflection caching is immediate on bead instantiation
---
frameworks/projects/Reflection/src/main/royale/ReflectionClasses.as | 1 +
.../org/apache/royale/reflection/beads/ReflectionCacheEnabledBead.as | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/frameworks/projects/Reflection/src/main/royale/ReflectionClasses.as b/frameworks/projects/Reflection/src/main/royale/ReflectionClasses.as
index 54eec72..b04df58 100644
--- a/frameworks/projects/Reflection/src/main/royale/ReflectionClasses.as
+++ b/frameworks/projects/Reflection/src/main/royale/ReflectionClasses.as
@@ -61,6 +61,7 @@ internal class ReflectionClasses
import org.apache.royale.reflection.DefinitionWithMetaData; DefinitionWithMetaData;
import org.apache.royale.reflection.FunctionDefinition; FunctionDefinition;
import org.apache.royale.reflection.MemberDefinitionBase; MemberDefinitionBase;
+ import org.apache.royale.reflection.MetaDataDefinition; MetaDataDefinition;
import org.apache.royale.reflection.MetaDataArgDefinition; MetaDataArgDefinition;
import org.apache.royale.reflection.MethodDefinition; MethodDefinition;
import org.apache.royale.reflection.ParameterDefinition; ParameterDefinition;
diff --git a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ReflectionCacheEnabledBead.as b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ReflectionCacheEnabledBead.as
index 5108897..109de85 100644
--- a/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ReflectionCacheEnabledBead.as
+++ b/frameworks/projects/Reflection/src/main/royale/org/apache/royale/reflection/beads/ReflectionCacheEnabledBead.as
@@ -47,6 +47,7 @@ package org.apache.royale.reflection.beads
*/
public function ReflectionCacheEnabledBead()
{
+ TypeDefinition.useCache = true;
}
@@ -60,7 +61,6 @@ package org.apache.royale.reflection.beads
*/
public function set strand(value:IStrand):void
{
- TypeDefinition.useCache = true;
}