You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pi...@apache.org on 2018/07/01 18:15:13 UTC
[royale-asjs] branch develop updated: Fix warnings in
DataGridExample
This is an automated email from the ASF dual-hosted git repository.
piotrz 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 ab2263d Fix warnings in DataGridExample
ab2263d is described below
commit ab2263d9526b7db1f9ca6e6f70ee8a674ae9d6d3
Author: Piotr Zarzycki <pi...@gmail.com>
AuthorDate: Sun Jul 1 20:15:04 2018 +0200
Fix warnings in DataGridExample
---
.../src/main/royale/models/ProductsModel.as | 99 +++++++++---------
.../src/main/royale/products/Product.as | 111 +++++++++++++--------
2 files changed, 120 insertions(+), 90 deletions(-)
diff --git a/examples/royale/DataGridExample/src/main/royale/models/ProductsModel.as b/examples/royale/DataGridExample/src/main/royale/models/ProductsModel.as
index efb2844..09fec47 100644
--- a/examples/royale/DataGridExample/src/main/royale/models/ProductsModel.as
+++ b/examples/royale/DataGridExample/src/main/royale/models/ProductsModel.as
@@ -1,47 +1,52 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package models
-{
- import org.apache.royale.collections.ArrayList;
- import products.Product;
-
- public class ProductsModel
- {
- private var _productList:ArrayList = new ArrayList([
- new Product("ps100","Widgets",44,200,"assets/smallbluerect.jpg"),
- new Product("tx200","Thingys",5,285,"assets/smallgreenrect.jpg"),
- new Product("rz300","Sprockets",80,105,"assets/smallyellowrect.jpg"),
- new Product("dh440","Doohickies",10,340,"assets/smallredrect.jpg"),
- new Product("ps220","Weejets",35,190,"assets/smallorangerect.jpg")
- ]);
-
- public function get productList():ArrayList
- {
- return _productList;
- }
-
- public var productArray:Array = [
- new Product("ps100","Blueberries",44,200,"assets/smallbluerect.jpg"),
- new Product("tx200","Kiwis",5,285,"assets/smallgreenrect.jpg"),
- new Product("rz300","Bananas",80,105,"assets/smallyellowrect.jpg"),
- new Product("dh440","Strawberries",10,340,"assets/smallredrect.jpg"),
- new Product("ps220","Oranges",35,190,"assets/smallorangerect.jpg")
- ];
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package models
+{
+ import org.apache.royale.collections.ArrayList;
+ import products.Product;
+
+ public class ProductsModel
+ {
+ private var _productList:ArrayList = new ArrayList([
+ new Product("ps100","Widgets",44,200,"assets/smallbluerect.jpg"),
+ new Product("tx200","Thingys",5,285,"assets/smallgreenrect.jpg"),
+ new Product("rz300","Sprockets",80,105,"assets/smallyellowrect.jpg"),
+ new Product("dh440","Doohickies",10,340,"assets/smallredrect.jpg"),
+ new Product("ps220","Weejets",35,190,"assets/smallorangerect.jpg")
+ ]);
+
+ public function get productList():ArrayList
+ {
+ return _productList;
+ }
+
+ private var _productArray:Array = [
+ new Product("ps100","Blueberries",44,200,"assets/smallbluerect.jpg"),
+ new Product("tx200","Kiwis",5,285,"assets/smallgreenrect.jpg"),
+ new Product("rz300","Bananas",80,105,"assets/smallyellowrect.jpg"),
+ new Product("dh440","Strawberries",10,340,"assets/smallredrect.jpg"),
+ new Product("ps220","Oranges",35,190,"assets/smallorangerect.jpg")
+ ];
+
+ public function get productArray():Array
+ {
+ return _productArray;
+ }
+ }
+}
diff --git a/examples/royale/DataGridExample/src/main/royale/products/Product.as b/examples/royale/DataGridExample/src/main/royale/products/Product.as
index 8fb3e21..eb7049d 100644
--- a/examples/royale/DataGridExample/src/main/royale/products/Product.as
+++ b/examples/royale/DataGridExample/src/main/royale/products/Product.as
@@ -1,43 +1,68 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// 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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package products
-{
- public class Product
- {
- public function Product(id:String,title:String,detail:Number,sales:Number,image:String)
- {
- this.id = id;
- this.title = title;
- this.detail = detail;
- this.sales = sales;
- this.image = image;
- }
-
- public var id:String;
- public var title:String;
- public var detail:Number;
- public var image:String;
- public var sales:Number;
-
- public function toString():String
- {
- return title;
- }
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package products
+{
+ public class Product
+ {
+ private var _id:String;
+ private var _title:String;
+ private var _detail:Number;
+ private var _image:String;
+ private var _sales:Number;
+
+ public function Product(id:String,title:String,detail:Number,sales:Number,image:String)
+ {
+ this._id = id;
+ this._title = title;
+ this._detail = detail;
+ this._sales = sales;
+ this._image = image;
+ }
+
+ public function get id():String
+ {
+ return _id;
+ }
+
+ public function get title():String
+ {
+ return _title;
+ }
+
+ public function get detail():Number
+ {
+ return _detail;
+ }
+
+ public function get image():String
+ {
+ return _image;
+ }
+
+ public function get sales():Number
+ {
+ return _sales;
+ }
+
+ public function toString():String
+ {
+ return title;
+ }
+ }
+}