You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/08/09 00:23:17 UTC
[royale-asjs] 02/09: get binding to work
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit d4dcbb295adfbed1272fc7e0f2679b8d1d2a9676
Author: Alex Harui <ah...@apache.org>
AuthorDate: Mon Aug 6 16:55:53 2018 -0700
get binding to work
---
.../MXRoyale/src/main/royale/mx/core/Application.as | 13 ++++++++++---
.../projects/MXRoyale/src/main/royale/mx/core/Container.as | 7 ++++++-
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Application.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Application.as
index b9da637..aa6abc9 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Application.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Application.as
@@ -62,11 +62,12 @@ import flash.utils.getQualifiedClassName;
import org.apache.royale.events.utils.MouseEventConverter;
}
-import mx.managers.FocusManager;
import mx.containers.beads.ApplicationLayout;
import mx.containers.beads.BoxLayout;
+import mx.managers.FocusManager;
import org.apache.royale.binding.ApplicationDataBinding;
+import org.apache.royale.binding.ContainerDataBinding;
import org.apache.royale.core.AllCSSValuesImpl;
import org.apache.royale.core.IBead;
import org.apache.royale.core.IBeadLayout;
@@ -84,8 +85,8 @@ import org.apache.royale.events.Event;
import org.apache.royale.events.IEventDispatcher;
import org.apache.royale.events.ValueChangeEvent;
import org.apache.royale.states.State;
-import org.apache.royale.utils.MixinManager;
import org.apache.royale.utils.MXMLDataInterpreter;
+import org.apache.royale.utils.MixinManager;
import org.apache.royale.utils.Timer;
import org.apache.royale.utils.loadBeadFromValuesManager;
@@ -523,7 +524,13 @@ public class Application extends Container implements IStrand, IParent, IEventDi
// Initialization and Start-up
//
//--------------------------------------------------------------------------
-
+
+ override protected function createChildren():void
+ {
+ super.createChildren();
+ dispatchEvent(new org.apache.royale.events.Event("viewChanged"));
+ }
+
/**
* @private
*/
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
index c5db136..3932df4 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
@@ -19,6 +19,8 @@
package mx.core
{
+ import org.apache.royale.binding.DataBindingBase;
+ import org.apache.royale.binding.ContainerDataBinding;
import org.apache.royale.core.ContainerBaseStrandChildren;
import org.apache.royale.core.IBeadLayout;
import org.apache.royale.core.IBorderPaddingMarginValuesImpl
@@ -622,7 +624,10 @@ public class Container extends UIComponent
override protected function createChildren():void
{
MXMLDataInterpreter.generateMXMLInstances(_mxmlDocument, this, MXMLDescriptor);
-
+
+ if (getBeadByType(DataBindingBase) == null)
+ addBead(new ContainerDataBinding());
+
dispatchEvent(new Event("initBindings"));
dispatchEvent(new Event("initComplete"));
}