adjust timing of properties and valuesImpl init
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/ef5c7403 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/ef5c7403 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/ef5c7403 Branch: refs/heads/develop Commit: ef5c7403a82e1a43133d00c2a5d871961d1998e6 Parents: b1f2396 Author: Alex Harui <aha...@apache.org> Authored: Thu Sep 25 07:57:21 2014 -0700 Committer: Alex Harui <aha...@apache.org> Committed: Thu Sep 25 07:57:21 2014 -0700 ---------------------------------------------------------------------- .../src/org/apache/flex/core/Application.as | 12 +++++++----- .../FlexJS/src/org/apache/flex/core/Application.js | 17 +++++++++-------- 2 files changed, 16 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ef5c7403/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as ---------------------------------------------------------------------- diff --git a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as index 397fa5b..215a883 100644 --- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as +++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/Application.as @@ -99,7 +99,8 @@ package org.apache.flex.core { stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; - stage.quality = StageQuality.HIGH_16X16_LINEAR; + // should be opt-in + //stage.quality = StageQuality.HIGH_16X16_LINEAR; } loaderInfo.addEventListener(flash.events.Event.INIT, initHandler); @@ -120,9 +121,6 @@ package org.apache.flex.core private function initHandler(event:flash.events.Event):void { - ValuesManager.valuesImpl = valuesImpl; - ValuesManager.valuesImpl.init(this); - dispatchEvent(new Event("initialize")); if (initialView) @@ -147,7 +145,11 @@ package org.apache.flex.core * @playerversion AIR 2.6 * @productversion FlexJS 0.0 */ - public var valuesImpl:IValuesImpl; + public function set valuesImpl(value:IValuesImpl):void + { + ValuesManager.valuesImpl = value; + ValuesManager.valuesImpl.init(this); + } /** * The initial view. http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ef5c7403/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js index 2088956..c3a8e1e 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js @@ -15,7 +15,7 @@ goog.provide('org.apache.flex.core.Application'); goog.require('org.apache.flex.core.HTMLElementWrapper'); -goog.require('org.apache.flex.core.SimpleValuesImpl'); +goog.require('org.apache.flex.core.IValuesImpl'); goog.require('org.apache.flex.core.ValuesManager'); goog.require('org.apache.flex.utils.MXMLDataInterpreter'); @@ -65,9 +65,15 @@ org.apache.flex.core.Application.prototype.model = null; /** * @expose - * @type {org.apache.flex.core.SimpleValuesImpl} + * @param {org.apache.flex.core.IValuesImpl} value The IValuesImpl. */ -org.apache.flex.core.Application.prototype.valuesImpl = null; +org.apache.flex.core.Application.prototype.set_valuesImpl = + function(value) { + org.apache.flex.core.ValuesManager.valuesImpl = value; + if (value.init) { + value.init(this); + } +}; /** @@ -77,11 +83,6 @@ org.apache.flex.core.Application.prototype.start = function() { this.element = document.getElementsByTagName('body')[0]; this.element.flexjs_wrapper = this; - org.apache.flex.core.ValuesManager.valuesImpl = this.valuesImpl; - if (this.valuesImpl.init) { - this.valuesImpl.init(this); - } - this.dispatchEvent('initialize'); this.initialView.applicationModel = this.model;