flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [14/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - updated XMLTest
Date Wed, 04 May 2016 18:14:00 GMT
updated XMLTest


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7c5a215a
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7c5a215a
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7c5a215a

Branch: refs/heads/spark
Commit: 7c5a215a7586291b0df2b4297806c44151402b23
Parents: 0981892
Author: Harbs <harbs@in-tools.com>
Authored: Thu Apr 14 00:13:14 2016 +0300
Committer: Harbs <harbs@in-tools.com>
Committed: Thu Apr 14 00:13:14 2016 +0300

----------------------------------------------------------------------
 manualtests/XMLTest/src/MyInitialView.mxml | 54 ++++++++++++++++++++++++-
 1 file changed, 52 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7c5a215a/manualtests/XMLTest/src/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/manualtests/XMLTest/src/MyInitialView.mxml b/manualtests/XMLTest/src/MyInitialView.mxml
index 83de865..a60578c 100644
--- a/manualtests/XMLTest/src/MyInitialView.mxml
+++ b/manualtests/XMLTest/src/MyInitialView.mxml
@@ -35,6 +35,7 @@ limitations under the License.
 		<![CDATA[			
 						
             import XML;
+            import mx.collections.XMLListCollection;
 
             private var xmlStr:String = '<?xml version="1.0" encoding="UTF-8" ?>'+
                 '<catalog xmlns:fx="http://ns.adobe.com/mxml/2009"'+
@@ -135,8 +136,8 @@ trace(prod.childIndex());
                 list4[1] = <a id="2"/>;
                 list4[2] = <a id="3"/>;
 //JIRA https://issues.apache.org/jira/browse/FLEX-35072
-//                list1 += list4
-list1.concat(list4);
+                list1 += list4
+//list1.concat(list4);
                 xml2.insertChildAfter(xml2.a,<a id="123"/>);
                 xml2.a = list4;
                 xml2.a = <a id="123"/>;
@@ -185,7 +186,56 @@ list1.concat(list4);
                 trace(list1.toXMLString());
                 trace(list1.toString());
                 trace("done");
+                trace("test 3");
+var xmlSource:XML =
+<xmlParentNode>
+   <Set1>
+      <child><year>2015</year></child>
+      <child><year>2016</year></child>
+      <child><year>2017</year></child>
+  </Set1>
+  <Set2>
+      <child><year>2015</year></child>
+      <child><year>2016</year></child>
+      <child><year>2017</year></child>
+  </Set2>
+</xmlParentNode>;
 
+
+//var xmllcSet1:XMLListCollection = new XMLListCollection();
+//var xmllcSet2:XMLListCollection = new XMLListCollection();
+
+//xmllcSet1.source = xmlSource.Set1.child;
+//xmllcSet2.source = xmlSource.Set2.child;
+
+var xmllcSet1:XMLList = xmlSource.Set1.child;
+var xmllcSet2:XMLList = xmlSource.Set2.child;
+
+trace(xmllcSet1.toXMLString());
+trace(xmllcSet2.toXMLString());
+
+
+//var xmllcFiltered: XMLListCollection = new XMLListCollection();
+
+//xmllcFiltered.source = xmlSource.Set1.child.(year == "2015");
+var xmllcFiltered:XMLList = xmlSource.Set1.child.(year == "2015");
+trace(xmllcFiltered.toXMLString());
+trace("test 4");
+var svg:XML = <svg>
+ <group>
+   <rect id="1" />
+   <rect id="2" />
+ </group>
+ <group>
+   <rect id="3" />
+   <rect id="4" />
+ </group>
+</svg>;
+
+var rects:XMLList = svg..rect;
+rects[1].@width = "100px";
+rects.(@id==3).@height = "100px";
+trace(rects.toXMLString());
             }
 		]]>
 	</fx:Script>


Mime
View raw message