You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pe...@apache.org on 2018/03/19 14:29:10 UTC

[royale-asjs] branch feature/MXRoyale updated: Updated examples to remove js:initialView.

This is an automated email from the ASF dual-hosted git repository.

pent pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/feature/MXRoyale by this push:
     new fbccc64  Updated examples to remove js:initialView.
fbccc64 is described below

commit fbccc64d2bb9fb0ce0773572be9bbb0983686b77
Author: Peter Ent <pe...@apache.org>
AuthorDate: Mon Mar 19 10:29:03 2018 -0400

    Updated examples to remove js:initialView.
---
 .../src/main/royale/ControlsExample.mxml           | 47 ++++++++++++++--------
 .../HelloWorld/src/main/royale/HelloWorld.mxml     | 21 +++++-----
 2 files changed, 43 insertions(+), 25 deletions(-)

diff --git a/examples/mxroyale/ControlsExample/src/main/royale/ControlsExample.mxml b/examples/mxroyale/ControlsExample/src/main/royale/ControlsExample.mxml
index b63698b..15c7174 100644
--- a/examples/mxroyale/ControlsExample/src/main/royale/ControlsExample.mxml
+++ b/examples/mxroyale/ControlsExample/src/main/royale/ControlsExample.mxml
@@ -17,25 +17,40 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<mx:Application xmlns:mx="library://ns.apache.org/royale/mx"
-                   xmlns:js="library://ns.apache.org/royale/basic"
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+                   xmlns:mx="library://ns.apache.org/royale/mx"
                    width="600" height="400" >
 	<!-- to do: layout="absolute" minWidth="955" minHeight="600" -->
+	<fx:Style>
+		@namespace mx "library://ns.apache.org/royale/mx";
+		
+		/* set position:absolute to make the (x,y) properties work */
+		
+		mx|HBox {
+			position: absolute;
+			horizontalGap: 10px;
+			verticalAlign: middle;
+		}
+		
+		mx|VBox {
+			position: absolute;
+			verticalGap: 10px;
+			horizontalAlign: middle;
+		}
+	</fx:Style>
 	
+	<mx:VBox x="10" y="10" width="200" height="300">
+		<mx:Label text="Hello World"/>
+		<mx:Button label="Push Me" />
+		<mx:Button label="Green" icon="assets/smallgreenrect.jpg"  />
+		<mx:Image source="assets/smallgreenrect.jpg"  />
+	</mx:VBox>
+	<mx:HBox x="300" y="10" width="300" height="200">
+		<mx:Label text="Hello World"/>
+		<mx:Button label="Push Me" />
+		<mx:Button label="Green" icon="assets/smallgreenrect.jpg"  />
+		<mx:Image source="assets/smallgreenrect.jpg"  />
+	</mx:HBox>
 
-	<!-- temporary until we can get this worked out -->
-    <js:initialView>
-        <js:View>
-        	<js:beads>
-        		<js:BasicLayout />
-        	</js:beads>
-        	<mx:Box x="10" y="10">
-				<mx:Label text="Hello World"/>
-				<mx:Button label="Push Me" />
-				<mx:Button label="Green" icon="assets/smallgreenrect.jpg"  />
-				<mx:Image source="assets/smallgreenrect.jpg"  />
-        	</mx:Box>
-        </js:View>
-    </js:initialView>
         
 </mx:Application>
\ No newline at end of file
diff --git a/examples/mxroyale/HelloWorld/src/main/royale/HelloWorld.mxml b/examples/mxroyale/HelloWorld/src/main/royale/HelloWorld.mxml
index 4d01ebb..2a75c9b 100644
--- a/examples/mxroyale/HelloWorld/src/main/royale/HelloWorld.mxml
+++ b/examples/mxroyale/HelloWorld/src/main/royale/HelloWorld.mxml
@@ -17,17 +17,20 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<mx:Application xmlns:mx="library://ns.apache.org/royale/mx"
-                   xmlns:js="library://ns.apache.org/royale/basic"
+<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+                   xmlns:mx="library://ns.apache.org/royale/mx"
                    width="600" height="400" >
 	<!-- to do: layout="absolute" minWidth="955" minHeight="600" -->
-	
+	<fx:Style>
+		@namespace mx "library://ns.apache.org/royale/mx";
+		
+		/* set position:absolute to make the (x,y) properties work */
+		mx|Label {
+			position: absolute;
+		}
+		
+	</fx:Style>
 
-	<!-- temporary until we can get this worked out -->
-    <js:initialView>
-        <js:View>
-        	<mx:Label text="Hello World" x="20" y="20" />
-        </js:View>
-    </js:initialView>
+	<mx:Label text="Hello World" x="20" y="20" />
         
 </mx:Application>
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
pent@apache.org.