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/01/13 17:58:32 UTC

[royale-asjs] branch develop updated: Add AlertExample

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 68e6700  Add AlertExample
68e6700 is described below

commit 68e67008328754eac247cedd7df0a92e1d225f4f
Author: Piotr Zarzycki <pi...@gmail.com>
AuthorDate: Sat Jan 13 18:58:09 2018 +0100

    Add AlertExample
---
 examples/royale/AlertExample/AlertExample.as3proj  | 89 ++++++++++++++++++++++
 examples/royale/AlertExample/build.xml             | 54 +++++++++++++
 examples/royale/AlertExample/pom.xml               | 84 ++++++++++++++++++++
 .../AlertExample/src/main/royale/AlertExample.mxml | 50 ++++++++++++
 4 files changed, 277 insertions(+)

diff --git a/examples/royale/AlertExample/AlertExample.as3proj b/examples/royale/AlertExample/AlertExample.as3proj
new file mode 100644
index 0000000..d8d8d63
--- /dev/null
+++ b/examples/royale/AlertExample/AlertExample.as3proj
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<project>
+  <output>
+    <movie version="11"/>
+    <movie disabled="False"/>
+    <movie height="600"/>
+    <movie fps="60"/>
+    <movie background="#FFFFFF"/>
+    <movie path="bin-debug/AlertExample.swf"/>
+    <movie width="800"/>
+    <movie input=""/>
+  </output>
+  &lt;!-- Other classes to be compiled into your SWF --&gt;
+  <classpaths>
+    <class path="src/main/royale"/>
+  </classpaths>
+  <moonshineResourcePaths></moonshineResourcePaths>
+  <build>
+    <option showUnusedTypeSelectorWarnings="True"/>
+    <option customSDK=""/>
+    <option strict="True"/>
+    <option accessible="False"/>
+    <option useNetwork="True"/>
+    <option allowSourcePathOverlap="False"/>
+    <option useResourceBundleMetadata="True"/>
+    <option additional=""/>
+    <option benchmark="False"/>
+    <option locale=""/>
+    <option es="False"/>
+    <option verboseStackTraces="False"/>
+    <option loadConfig=""/>
+    <option linkReport=""/>
+    <option warnings="True"/>
+    <option showActionScriptWarnings="True"/>
+    <option staticLinkRSL="False"/>
+    <option showBindingWarnings="True"/>
+    <option compilerConstants=""/>
+    <option optimize="False"/>
+    <option showDeprecationWarnings="True"/>
+    <option antBuildPath="build/build.xml"/>
+  </build>
+  <includeLibraries></includeLibraries>
+  <libraryPaths></libraryPaths>
+  <externalLibraryPaths></externalLibraryPaths>
+  <rslPaths></rslPaths>
+  <intrinsics></intrinsics>
+  <library></library>
+  <compileTargets>
+    <compile path="src/main/royale/AlertExample.mxml"/>
+  </compileTargets>
+  <hiddenPaths></hiddenPaths>
+  <preBuildCommand>null</preBuildCommand>
+  <postBuildCommand alwaysRun="False">null</postBuildCommand>
+  <options>
+    <option defaultBuildTargets=""/>
+    <option testMovie=""/>
+    <option testMovieCommand=""/>
+    <option showHiddenPaths="False"/>
+  </options>
+  <moonshineRunCustomization>
+    <option targetPlatform="2"/>
+    <option deviceSimulator="null"/>
+    <option projectType="2"/>
+    <option launchMethod="Simulator"/>
+    <option urlToLaunch=""/>
+    <deviceSimulator>null</deviceSimulator>
+    <certAndroid>null</certAndroid>
+    <certIos>null</certIos>
+    <certIosProvisioning>null</certIosProvisioning>
+  </moonshineRunCustomization>
+</project>
\ No newline at end of file
diff --git a/examples/royale/AlertExample/build.xml b/examples/royale/AlertExample/build.xml
new file mode 100644
index 0000000..77330f7
--- /dev/null
+++ b/examples/royale/AlertExample/build.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+
+  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.
+
+-->
+
+
+<project name="alertexample" default="main" basedir=".">
+    <property name="ROYALE_HOME" location="../../.."/>
+    <property name="example" value="AlertExample" />
+    
+    <property file="${ROYALE_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${ROYALE_HOME}/build.properties"/>
+    <property name="ROYALE_HOME" value="${ROYALE_HOME}"/>
+
+    <include file="${basedir}/../../build_example.xml" />
+    
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
+    </target>
+    
+    <target name="clean">
+        <delete dir="${basedir}/bin" failonerror="false" />
+        <delete dir="${basedir}/bin-debug" failonerror="false" />
+        <delete dir="${basedir}/bin-release" failonerror="false" />
+        <delete dir="${basedir}/target" failonerror="false" />
+    </target>
+
+    <target name="examine" depends="build_example.get.browser">
+        <property name="which" value="debug" />
+        <echo message="Make sure label appears."/>
+        <exec executable="${browser}" dir="${basedir}/bin-${which}" failonerror="true">
+            <arg value="${basedir}/bin-${which}/${example}.html"/>
+        </exec>
+        <exec executable="${browser}" dir="${basedir}/bin/js-${which}" failonerror="true">
+            <arg value="${basedir}/bin/js-${which}/index.html"/>
+        </exec>
+    </target>
+
+</project>
diff --git a/examples/royale/AlertExample/pom.xml b/examples/royale/AlertExample/pom.xml
new file mode 100644
index 0000000..40e44d3
--- /dev/null
+++ b/examples/royale/AlertExample/pom.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 
+  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.
+ 
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+ 
+  <groupId>org.apache.royale.examples</groupId>
+  <artifactId>AlertExample</artifactId>
+  <version>0.9.1-SNAPSHOT</version>
+  <packaging>swf</packaging>
+ 
+  <name>AlertExample</name>
+ 
+  <build>
+	<sourceDirectory>src/main/royale</sourceDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.royale.compiler</groupId>
+        <artifactId>royale-maven-plugin</artifactId>
+		<version>0.9.1-SNAPSHOT</version>
+        <extensions>true</extensions>
+        <configuration>
+          <mainClass>AlertExample.mxml</mainClass>
+          <debug>true</debug>
+        </configuration>
+		<dependencies>
+          <dependency>
+            <groupId>org.apache.royale.compiler</groupId>
+            <artifactId>compiler-jx</artifactId>
+            <version>0.9.1-SNAPSHOT</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+ 
+  <dependencies>
+   <dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Basic</artifactId>
+      <version>0.9.1-SNAPSHOT</version>
+      <type>swc</type>
+       <classifier>js</classifier>
+    </dependency>
+	<dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Basic</artifactId>
+      <version>0.9.1-SNAPSHOT</version>
+      <type>swc</type>
+       <classifier>swf</classifier>
+    </dependency>
+	<dependency>
+      <groupId>org.apache.royale.framework</groupId>
+      <artifactId>Language</artifactId>
+      <version>0.9.1-SNAPSHOT</version>
+      <type>swc</type>
+       <classifier>js</classifier>
+    </dependency>
+	<dependency>
+      <groupId>com.adobe.flash.framework</groupId>
+      <artifactId>playerglobal</artifactId>
+      <version>11.1</version>
+      <type>swc</type>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+ 
+</project>
\ No newline at end of file
diff --git a/examples/royale/AlertExample/src/main/royale/AlertExample.mxml b/examples/royale/AlertExample/src/main/royale/AlertExample.mxml
new file mode 100644
index 0000000..b9c28e2
--- /dev/null
+++ b/examples/royale/AlertExample/src/main/royale/AlertExample.mxml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+                   xmlns:js="library://ns.apache.org/royale/basic" >
+	<fx:Script>
+		<![CDATA[
+			import org.apache.royale.html.Alert;
+
+
+			private function onBtnShowAlert(event:MouseEvent):void
+			{
+				var alert:Alert = Alert.show("Are you sure ?", this, "Alert Title", Alert.OK | Alert.CANCEL);
+				//alert.height = 150;
+				//alert.addEventListener("close", onShowAlertAction);
+			}
+			
+			/*private function onShowAlertAction(event:CloseEvent):void
+			{
+				alertStatus.text = "Alert status: " + event.detail;
+			}*/
+		]]>
+	</fx:Script>
+    <js:valuesImpl>
+        <js:SimpleCSSValuesImpl />
+    </js:valuesImpl>
+    <js:initialView>
+        <js:View>
+        		<js:TextButton text="Show Alert" click="onBtnShowAlert(event)" 
+						   width="100" height="30"/>
+			<js:Label id="alertStatus" width="150" height="30" text="Alert status: " y="35"/>
+        </js:View>
+    </js:initialView>
+</js:Application>

-- 
To stop receiving notification emails like this one, please contact
['"commits@royale.apache.org" <co...@royale.apache.org>'].