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 2019/12/13 06:18:28 UTC

[royale-asjs] 01/03: Fix swf ConstantBinding - error was being thrown if the source is an extenal class, and not the mxml document. (DatabindingTestbed)

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 b2133b685b9a8274a2230d4c7c627a98a6275c62
Author: greg-dove <gr...@gmail.com>
AuthorDate: Thu Dec 12 15:32:54 2019 +1300

    Fix swf ConstantBinding - error was being thrown if the source is an extenal class, and not the mxml document. (DatabindingTestbed)
---
 .../src/main/royale/org/apache/royale/binding/ConstantBinding.as  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/ConstantBinding.as b/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/ConstantBinding.as
index a730ee9..66893ee 100644
--- a/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/ConstantBinding.as
+++ b/frameworks/projects/Binding/src/main/royale/org/apache/royale/binding/ConstantBinding.as
@@ -171,7 +171,13 @@ package org.apache.royale.binding
             
             if (sourceID != null)
             {
-                source = document[sourceID];
+                COMPILE::SWF{
+                    if (sourceID in document)
+                        source = document[sourceID];
+                }
+                COMPILE::JS{
+                    source = document[sourceID];
+                }
             }
             else
             {