You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by er...@apache.org on 2012/12/06 14:52:11 UTC
svn commit: r1417885 - in /incubator/flex/asjs/branches/develop/publisher:
./ intermediate/FlexJSTest_dummy/ intermediate/FlexJSTest_dummy/js/
Author: erikdebruin
Date: Thu Dec 6 13:52:10 2012
New Revision: 1417885
URL: http://svn.apache.org/viewvc?rev=1417885&view=rev
Log:
Final touches to the project structure; updated the README, build.properties; added a 'lint' target to the build script.
Added:
incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/FlexJSTest_dummy.js (with props)
incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyController.js (with props)
incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyInitialView.js (with props)
incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyModel.js (with props)
incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MySimpleValuesImpl.js (with props)
Removed:
incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/FlexJSTest_dummy.js
incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/MyController.js
incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/MyInitialView.js
incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/MyModel.js
incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/MySimpleValuesImpl.js
Modified:
incubator/flex/asjs/branches/develop/publisher/build.properties
incubator/flex/asjs/branches/develop/publisher/build.xml
Modified: incubator/flex/asjs/branches/develop/publisher/build.properties
URL: http://svn.apache.org/viewvc/incubator/flex/asjs/branches/develop/publisher/build.properties?rev=1417885&r1=1417884&r2=1417885&view=diff
==============================================================================
--- incubator/flex/asjs/branches/develop/publisher/build.properties (original)
+++ incubator/flex/asjs/branches/develop/publisher/build.properties Thu Dec 6 13:52:10 2012
@@ -1,21 +1,21 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
+################################################################################
+##
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+##
+################################################################################
# Clean out the previous run's intermediate files? Set false if working with a dummy set of JS intermediairies.
CLEAN_INTERMEDIATE_JS=false
Modified: incubator/flex/asjs/branches/develop/publisher/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/asjs/branches/develop/publisher/build.xml?rev=1417885&r1=1417884&r2=1417885&view=diff
==============================================================================
--- incubator/flex/asjs/branches/develop/publisher/build.xml (original)
+++ incubator/flex/asjs/branches/develop/publisher/build.xml Thu Dec 6 13:52:10 2012
@@ -69,11 +69,11 @@
</target>
<target name="cleanIntermediate" depends="checkDeleteIntermediate" if="deleteIntermediate">
- <delete dir="${DIR_INTERMEDIATE_APPLICATION}" />
+ <delete dir="${DIR_INTERMEDIATE}" />
</target>
<target name="cleanRelease">
- <delete dir="${DIR_RELEASE_APPLICATION}" />
+ <delete dir="${DIR_RELEASE}" />
</target>
<target name="createDirs">
Added: incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/FlexJSTest_dummy.js
URL: http://svn.apache.org/viewvc/incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/FlexJSTest_dummy.js?rev=1417885&view=auto
==============================================================================
--- incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/FlexJSTest_dummy.js (added)
+++ incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/FlexJSTest_dummy.js Thu Dec 6 13:52:10 2012
@@ -0,0 +1,59 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+goog.provide('FlexJSTest_dummy');
+
+goog.require('MyController');
+goog.require('MyInitialView');
+goog.require('MyModel');
+goog.require('MySimpleValuesImpl');
+
+goog.require('org.apache.flex.FlexGlobal');
+
+goog.require('org.apache.flex.core.Application');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.Application}
+ */
+FlexJSTest_dummy = function() {
+ org.apache.flex.core.Application.call(this);
+
+ this.controller = org.apache.flex.FlexGlobal.newObject(
+ MyController, [this]
+ );
+
+ this.initialView =
+ /** @type {org.apache.flex.core.ViewBase} */ (
+ org.apache.flex.FlexGlobal.newObject(MyInitialView, [this])
+ );
+
+ this.model =
+ /** @type {flash.events.EventDispatcher} */ (
+ org.apache.flex.FlexGlobal.newObject(MyModel, [])
+ );
+ this.model.set_labelText('Say hi!');
+
+ this.valuesImpl =
+ /** @type {org.apache.flex.core.SimpleValuesImpl} */ (
+ org.apache.flex.FlexGlobal.newObject(MySimpleValuesImpl, [this])
+ );
+
+ // this method of logging survives the Closure Compiler
+ //window['console']['log'](app);
+};
+goog.inherits(FlexJSTest_dummy, org.apache.flex.core.Application);
+
+// Ensures the symbol will be visible after compiler renaming.
+goog.exportSymbol('FlexJSTest_dummy', FlexJSTest_dummy);
Propchange: incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/FlexJSTest_dummy.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyController.js
URL: http://svn.apache.org/viewvc/incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyController.js?rev=1417885&view=auto
==============================================================================
--- incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyController.js (added)
+++ incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyController.js Thu Dec 6 13:52:10 2012
@@ -0,0 +1,56 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+goog.provide('MyController');
+
+goog.require('flash.events.EventDispatcher');
+
+goog.require('org.apache.flex.FlexGlobal');
+
+/**
+ * @constructor
+ * @param {org.apache.flex.core.Application} app The main application.
+ */
+MyController = function(app) {
+ /**
+ * @type {org.apache.flex.core.Application}
+ */
+ this.app = app || null;
+
+ this.app.addEventListener(
+ 'viewChanged', org.apache.flex.FlexGlobal.createProxy(
+ this, this.viewChangeHandler
+ )
+ );
+};
+
+/**
+ * @this {MyController}
+ * @param {flash.events.Event} event The event.
+ */
+MyController.prototype.viewChangeHandler = function(event) {
+ this.app.initialView.addEventListener(
+ 'buttonClicked', org.apache.flex.FlexGlobal.createProxy(
+ this, this.buttonClickHandler
+ )
+ );
+};
+
+/**
+ * @this {MyController}
+ * @param {flash.events.Event} event The event.
+ */
+MyController.prototype.buttonClickHandler = function(event) {
+ this.app.model.set_labelText('Hello Universe');
+};
Propchange: incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyController.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyInitialView.js
URL: http://svn.apache.org/viewvc/incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyInitialView.js?rev=1417885&view=auto
==============================================================================
--- incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyInitialView.js (added)
+++ incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyInitialView.js Thu Dec 6 13:52:10 2012
@@ -0,0 +1,67 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+goog.provide('MyInitialView');
+
+goog.require('org.apache.flex.FlexGlobal');
+
+goog.require('org.apache.flex.core.ViewBase');
+goog.require('org.apache.flex.html.staticControls.Label');
+goog.require('org.apache.flex.html.staticControls.TextButton');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.ViewBase}
+ */
+MyInitialView = function() {
+ org.apache.flex.core.ViewBase.call(this);
+};
+goog.inherits(MyInitialView, org.apache.flex.core.ViewBase);
+
+/**
+ * @override
+ * @this {org.apache.flex.core.ViewBase}
+ * @return {Array} The array of UI element descriptors.
+ */
+MyInitialView.prototype.get_uiDescriptors = function() {
+ return [
+ org.apache.flex.html.staticControls.Label,
+ null,
+ 'lbl',
+ 2, 'x', 100, 'y', 25,
+ 0,
+ 0,
+ 1, 'text', 0, 'model', 'labelText', 'labelTextChanged',
+ org.apache.flex.html.staticControls.TextButton,
+ null,
+ null,
+ 3, 'text', 'OK', 'x', 100, 'y', 75,
+ 0,
+ 1, 'click', this.clickHandler, 0
+ ];
+};
+
+/**
+ * @this {MyInitialView}
+ * @param {flash.events.Event} event The event.
+ */
+MyInitialView.prototype.clickHandler = function(event) {
+ this.dispatchEvent(
+ /** @type {flash.events.Event} */ (
+ org.apache.flex.FlexGlobal.newObject(
+ flash.events.Event, ['buttonClicked']
+ )
+ )
+ );
+};
Propchange: incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyInitialView.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyModel.js
URL: http://svn.apache.org/viewvc/incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyModel.js?rev=1417885&view=auto
==============================================================================
--- incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyModel.js (added)
+++ incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyModel.js Thu Dec 6 13:52:10 2012
@@ -0,0 +1,60 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the 'License');
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an 'AS IS' BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+goog.provide('MyModel');
+
+goog.require('flash.events.EventDispatcher');
+
+goog.require('org.apache.flex.FlexGlobal');
+
+/**
+ * @constructor
+ * @extends {flash.events.EventDispatcher}
+ */
+MyModel = function() {
+ flash.events.EventDispatcher.call(this);
+
+ /**
+ * @private
+ * @type {string}
+ */
+ this.labelText_;
+};
+goog.inherits(MyModel, flash.events.EventDispatcher);
+
+/**
+ * @expose
+ * @this {MyModel}
+ * @return {string} The labelText getter.
+ */
+MyModel.prototype.get_labelText = function() {
+ return this.labelText_;
+};
+
+/**
+ * @expose
+ * @this {MyModel}
+ * @param {string} value The labelText setter.
+ */
+MyModel.prototype.set_labelText = function(value) {
+ if (value != this.labelText_) {
+ this.labelText_ = value;
+
+ this.dispatchEvent(
+ org.apache.flex.FlexGlobal.newObject(
+ flash.events.Event, ['labelTextChanged']
+ )
+ );
+ }
+};
Propchange: incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MyModel.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MySimpleValuesImpl.js
URL: http://svn.apache.org/viewvc/incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MySimpleValuesImpl.js?rev=1417885&view=auto
==============================================================================
--- incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MySimpleValuesImpl.js (added)
+++ incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MySimpleValuesImpl.js Thu Dec 6 13:52:10 2012
@@ -0,0 +1,41 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+goog.provide('MySimpleValuesImpl');
+
+goog.require('org.apache.flex.core.SimpleValuesImpl');
+
+/**
+ * @constructor
+ * @extends {org.apache.flex.core.SimpleValuesImpl}
+ */
+MySimpleValuesImpl = function() {
+ org.apache.flex.core.SimpleValuesImpl.call(this);
+
+ /**
+ * @private
+ * @type {Object}
+ */
+ this.values_ = {
+ /*
+ ITextButtonBead :
+ org.apache.flex.html.staticControls.beads.TextButtonBead,
+ ITextBead :
+ org.apache.flex.html.staticControls.beads.TextFieldBead,
+ ITextModel :
+ org.apache.flex.html.staticControls.beads.models.TextModel
+ */
+ };
+};
+goog.inherits(MySimpleValuesImpl, org.apache.flex.core.SimpleValuesImpl);
Propchange: incubator/flex/asjs/branches/develop/publisher/intermediate/FlexJSTest_dummy/js/MySimpleValuesImpl.js
------------------------------------------------------------------------------
svn:eol-style = native