This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 9709f50 todomvc: remove MXRoyale dependency in pom.xml, comment VO
JSON methods, for reference, since are not needed anymore and clean some
imports and code
9709f50 is described below
commit 9709f503066268fd3bf2f79ed0c5014b680780ca
Author: Carlos Rovira <[email protected]>
AuthorDate: Wed Feb 12 16:45:23 2020 +0100
todomvc: remove MXRoyale dependency in pom.xml, comment VO JSON methods,
for reference, since are not needed anymore and clean some imports and code
---
examples/jewel/todomvc/pom.xml | 15 ------------
examples/jewel/todomvc/src/main/royale/App.mxml | 2 +-
.../royale/jewel/todomvc/views/TodoFooter.mxml | 5 ++--
.../jewel/todomvc/views/TodoListSection.mxml | 8 +++----
.../src/main/royale/jewel/todomvc/vos/TodoVO.as | 27 +++++++++++-----------
5 files changed, 21 insertions(+), 36 deletions(-)
diff --git a/examples/jewel/todomvc/pom.xml b/examples/jewel/todomvc/pom.xml
index 4e332c7..c630438 100644
--- a/examples/jewel/todomvc/pom.xml
+++ b/examples/jewel/todomvc/pom.xml
@@ -46,7 +46,6 @@
<additionalCompilerOptions>
-js-dynamic-access-unknown-members=true;
-source-map=true;
-
-compiler.exclude-defaults-css-files=MXRoyale-${royale.framework.version}-js.swc:defaults.css
</additionalCompilerOptions>
</configuration>
</plugin>
@@ -63,13 +62,6 @@
</dependency>
<dependency>
<groupId>org.apache.royale.framework</groupId>
- <artifactId>MXRoyale</artifactId>
- <version>0.9.7-SNAPSHOT</version>
- <type>swc</type>
- <classifier>js</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
<artifactId>Storage</artifactId>
<version>0.9.7-SNAPSHOT</version>
<type>swc</type>
@@ -104,13 +96,6 @@
</dependency>
<dependency>
<groupId>org.apache.royale.framework</groupId>
- <artifactId>MXRoyale</artifactId>
- <version>0.9.7-SNAPSHOT</version>
- <type>swc</type>
- <classifier>swf</classifier>
- </dependency>
- <dependency>
- <groupId>org.apache.royale.framework</groupId>
<artifactId>Storage</artifactId>
<version>0.9.7-SNAPSHOT</version>
<type>swc</type>
diff --git a/examples/jewel/todomvc/src/main/royale/App.mxml
b/examples/jewel/todomvc/src/main/royale/App.mxml
index 04f752e..9dda280 100644
--- a/examples/jewel/todomvc/src/main/royale/App.mxml
+++ b/examples/jewel/todomvc/src/main/royale/App.mxml
@@ -30,8 +30,8 @@
<fx:Script>
<![CDATA[
- import org.apache.royale.reflection.registerClassAlias;
import org.apache.royale.collections.ArrayList;
+ import org.apache.royale.reflection.registerClassAlias;
/**
* Register ArrayCollection alias to map to ArrayList
diff --git
a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoFooter.mxml
b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoFooter.mxml
index 30c90bc..0503abc 100644
--- a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoFooter.mxml
+++ b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoFooter.mxml
@@ -29,8 +29,7 @@ limitations under the License.
[Bindable]
public var todoModel:TodoModel;
- override public function set currentState(value:String):void
- {
+ override public function set currentState(value:String):void {
super.currentState = value;
dispatchEvent(new TodoEvent(TodoEvent.REFRESH_LIST, null,
value));
}
@@ -53,11 +52,13 @@ limitations under the License.
}
]]>
</fx:Script>
+
<j:states>
<js:State name="All"/>
<js:State name="Active"/>
<js:State name="Completed"/>
</j:states>
+
<j:beads>
<js:SimpleStatesImpl/>
<js:ContainerDataBinding/>
diff --git
a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoListSection.mxml
b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoListSection.mxml
index 58a20e9..8ccf147 100644
---
a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoListSection.mxml
+++
b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/views/TodoListSection.mxml
@@ -29,7 +29,6 @@ limitations under the License.
import jewel.todomvc.models.TodoModel;
import org.apache.royale.core.IBeadModel;
- import org.apache.royale.routing.RouteState;
[Bindable]
public var todoModel:TodoModel;
@@ -37,22 +36,21 @@ limitations under the License.
/**
* Set up child views
*/
- public function setUp():void
- {
+ public function setUp():void {
todoModel = getBeadByType(IBeadModel) as TodoModel;
todoModel.router = router;
header.todoModel = todoModel;
footer.todoModel = todoModel;
}
- private function getTitleLookup():Object{
+ private function getTitleLookup():Object {
var retVal:Object = {};
var states:Array = [
TodoModel.ALL_FILTER,
TodoModel.ACTIVE_FILTER,
TodoModel.COMPLETED_FILTER
]
- for(var i:int=0;i<states.length;i++)
+ for(var i:int=0; i < states.length ; i++)
{
retVal[states[i]] = "TodoMVC - " + states[i] + " State";
}
diff --git a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/vos/TodoVO.as
b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/vos/TodoVO.as
index d6ba6db..6e9767b 100644
--- a/examples/jewel/todomvc/src/main/royale/jewel/todomvc/vos/TodoVO.as
+++ b/examples/jewel/todomvc/src/main/royale/jewel/todomvc/vos/TodoVO.as
@@ -46,19 +46,20 @@ package jewel.todomvc.vos
/**
* The following two methods could be used if we were saving and
reading the data as JSON,
- * but we're actually saving and reading as AMF, so they are not
necessary.
+ * but we're actually saving and reading as AMF, that knows how to
encode/decode itself,
+ * so they are not necessary, so we left commented for reference.
*/
- public function toJSON():Object{
- return {
- "label":label,
- "done":done
- }
- }
- public static function fromJSON(data:Object):TodoVO
- {
- var todo:TodoVO = new TodoVO(data["label"]);
- todo.done = data["done"];
- return todo;
- }
+ // public function toJSON():Object{
+ // return {
+ // "label":label,
+ // "done":done
+ // }
+ // }
+ // public static function fromJSON(data:Object):TodoVO
+ // {
+ // var todo:TodoVO = new TodoVO(data["label"]);
+ // todo.done = data["done"];
+ // return todo;
+ // }
}
}