flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject flex-tourjs git commit: Simple initial version for testing concept.
Date Thu, 19 Jan 2017 20:51:27 GMT
Repository: flex-tourjs
Updated Branches:
  refs/heads/develop 9caf770d5 -> c9e03429c


Simple initial version for testing concept.


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

Branch: refs/heads/develop
Commit: c9e03429c59e1cf4c3746e001c4c7944b0257d55
Parents: 9caf770
Author: Peter Ent <pent@apache.org>
Authored: Thu Jan 19 13:51:17 2017 -0700
Committer: Peter Ent <pent@apache.org>
Committed: Thu Jan 19 13:51:17 2017 -0700

----------------------------------------------------------------------
 TourJS/build.xml                                | 326 +++++++++++++++++++
 TourJS/src/main/flex/TourJS.mxml                |  42 +++
 TourJS/src/main/flex/TourJSMainView.mxml        | 160 +++++++++
 TourJS/src/main/resources/content.json          |  58 ++++
 .../generalComponents/alert/code/simple.mxml    |  24 ++
 .../generalComponents/button/code/radio.mxml    |  24 ++
 6 files changed, 634 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/c9e03429/TourJS/build.xml
----------------------------------------------------------------------
diff --git a/TourJS/build.xml b/TourJS/build.xml
new file mode 100644
index 0000000..de3dcbf
--- /dev/null
+++ b/TourJS/build.xml
@@ -0,0 +1,326 @@
+<?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="tourjs" default="main" basedir=".">
+    <property name="FLEXJS_HOME" location="../../flex-asjs"/>
+    <property name="example" value="TourJS" />
+    
+    <property file="${FLEXJS_HOME}/env.properties"/>
+    <property environment="env"/>
+    <property file="${FLEXJS_HOME}/build.properties"/>
+    <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
+    <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" />
+
+    <!-- Stuff from build_example -->
+    
+    <condition property="FALCON_HOME" value="${env.FALCON_HOME}">
+        <and>
+            <not>
+                <isset property="FALCON_HOME" />
+            </not>
+            <available file="${env.FALCON_HOME}/lib/falcon-mxmlc.jar" type="file" />
+        </and>
+    </condition>
+
+    <condition property="FALCON_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler">
+        <and>
+            <not>
+                <isset property="FALCON_HOME" />
+            </not>
+            <available file="${FLEXJS_HOME}/../flex-falcon/compiler/lib/falcon-mxmlc.jar"
type="file" />
+        </and>
+    </condition>
+
+    <condition property="FALCON_HOME" value="${FLEXJS_HOME}">
+        <and>
+            <not>
+                <isset property="FALCON_HOME" />
+            </not>
+            <available file="${FLEXJS_HOME}/lib/falcon-mxmlc.jar" type="file" />
+        </and>
+    </condition>
+
+    <condition property="FALCONJX_HOME" value="${env.FALCONJX_HOME}">
+        <and>
+            <not>
+                <isset property="FALCONJX_HOME" />
+            </not>
+            <available file="${env.FALCONJX_HOME}/lib/jsc.jar" type="file" />
+        </and>
+    </condition>
+
+    <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/js">
+        <and>
+            <not>
+                <isset property="FALCONJX_HOME" />
+            </not>
+            <available file="${FLEXJS_HOME}/js/lib/jsc.jar" type="file" />
+        </and>
+    </condition>
+
+    <condition property="FALCONJX_HOME" value="${FLEXJS_HOME}/../flex-falcon/compiler-jx">
+        <and>
+            <not>
+                <isset property="FALCONJX_HOME" />
+            </not>
+            <available file="${FLEXJS_HOME}/../flex-falcon/compiler-jx/lib/jsc.jar" type="file"
/>
+        </and>
+    </condition>
+
+    <condition property="GOOG_HOME" value="${env.GOOG_HOME}">
+        <and>
+            <not>
+                <isset property="GOOG_HOME" />
+            </not>
+            <available file="${env.GOOG_HOME}/closure/goog/base.js" type="file" />
+        </and>
+    </condition>
+
+    <condition property="GOOG_HOME" value="${FLEXJS_HOME}/js/lib/google/closure-library">
+        <and>
+            <not>
+                <isset property="GOOG_HOME" />
+            </not>
+            <available file="${FLEXJS_HOME}/js/lib/google/closure-library/closure/goog/base.js"
type="file" />
+        </and>
+    </condition>
+
+    <path id="lib.path">
+      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+    </path>
+    
+    <target name="compile" description="Compiles ${example}">
+        <echo message="Compiling ${example}.swf"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+
+        <!-- Load the <compc> task. We can't do this at the <project> level
-->
+        <!-- because targets that run before flexTasks.jar gets built would fail. -->
+        <taskdef resource="flexTasks.tasks" classpathref="lib.path"/>
+        <!-- this is a dummy var placeholder in case some example needs to define a theme
+            then they would set theme_arg=-theme=<path to theme> -->
+        <property name="theme_arg" value="-define=CONFIG::theme,false" />
+        <mxmlc fork="true"
+               file="${basedir}/src/main/flex/${example}.mxml"
+               output="${basedir}/bin-debug/${example}.swf">
+            <jvmarg line="${mxmlc.jvm.args}"/>
+            <arg value="+flexlib=${basedir}/frameworks" />
+            <arg value="-debug" />
+            <arg value="${theme_arg}" />
+            <arg value="-compiler.mxml.children-as-data" />
+            <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent"
/>
+            <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent"
/>
+            <arg value="-compiler.binding-value-change-event-type=valueChange" />
+			<arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher"
/>
+			<arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher"
/>
+			<arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+        </mxmlc>
+        
+        <html-wrapper 
+            height="100%" 
+            width="100%"
+            bgcolor="#ffffff"
+            name="${example}"
+            versionmajor="11"
+            versionminor="1"
+            versionrevision="0" 
+            output="${basedir}/bin-debug"/> 
+ 
+        <antcall target="copy-resources" />
+        <copy todir="${basedir}/bin-debug/fonts">
+            <fileset dir="${FLEX_HOME}/frameworks/fonts">
+                <include name="**/*.swf" />
+            </fileset>
+        </copy>
+    </target>
+
+    <target name="compilejs" description="Cross-compiles ${example}" unless="no.js">
+        <echo message="Compiling ${example}.js"/>
+        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+        <echo message="GOOG_HOME: ${GOOG_HOME}"/>
+        <property name="theme_arg" value="-define=CONFIG::theme,false" />
+        <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
+        <property name="opt1_arg" value="-define=CONFIG::opt1,false" />
+        <property name="opt2_arg" value="-define=CONFIG::opt2,false" />
+
+        <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
+            fork="true">
+            <jvmarg line="${mxmlc.jvm.args}"/>
+            <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
+            <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
+            <arg value="-debug=false" />
+            <arg value="${theme_arg}" />
+            <arg value="-compiler.mxml.children-as-data" />
+            <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent"
/>
+            <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent"
/>
+            <arg value="-compiler.binding-value-change-event-type=valueChange" />
+			<arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher"
/>
+			<arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher"
/>
+			<arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
+            <arg value="+playerglobal.version=${playerglobal.version}" />
+            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
+            <arg value="${extlib_arg}" />
+            <arg value="${opt1_arg}" />
+            <arg value="${opt2_arg}" />
+            <arg value="-js-output-type=FLEXJS" />
+            <arg value="-closure-lib=${GOOG_HOME}" />
+            <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources"
/>
+            <arg value="${basedir}/src/main/flex/${example}.mxml" />
+        </java>
+        <fail>
+			<condition>
+				<not>
+					<or>
+						<equals arg1="${errorCode}" arg2="0" />
+						<equals arg1="${errorCode}" arg2="2" />
+					</or>
+				</not>
+			</condition>
+		</fail>
+    </target>
+    
+    <macrodef name="html-wrapper">
+        <attribute name="width"/>
+        <attribute name="height"/>
+        <attribute name="bgcolor"/>
+        <attribute name="name"/>
+        <attribute name="versionmajor"/>
+        <attribute name="versionminor"/>
+        <attribute name="versionrevision"/>
+        <attribute name="output"/>
+            <sequential>
+                <copy toFile="@{output}/@{name}.html" 
+                    file="${FLEXJS_HOME}/templates/swfobject/index.template.html" />
+                <copy toDir="@{output}/history">
+                    <fileset dir="${FLEXJS_HOME}/templates/swfobject/history">
+                        <include name="**"/>
+                    </fileset>
+                </copy>
+                <copy toDir="@{output}">
+                    <fileset dir="${FLEXJS_HOME}/templates/swfobject">
+                        <include name="*"/>
+                        <exclude name="index.template.html"/>
+                    </fileset>
+                </copy>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${title}"
+                        value="@{name}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${bgcolor}"
+                        value="@{bgcolor}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${useBrowserHistory}"
+                        value="--"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${version_major}"
+                        value="@{versionmajor}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${version_minor}"
+                        value="@{versionminor}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${version_revision}"
+                        value="@{versionrevision}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${expressInstallSwf}"
+                        value="expressInstall.swf"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${expressInstallSwf}"
+                        value="expressInstall.swf"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${width}"
+                        value="@{width}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${height}"
+                        value="@{height}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${application}"
+                        value="@{name}"/>
+                </replace>
+                <replace file="@{output}/@{name}.html">
+                    <replacefilter
+                        token="$${swf}"
+                        value="@{name}"/>
+                </replace>
+        </sequential>
+    </macrodef>
+    
+    <target name="check-resources" >
+        <available file="${basedir}/src/main/resources"
+        type="dir"
+        property="has-resources"/>
+    </target>
+    
+    <target name="copy-resources" depends="check-resources" if="has-resources">
+        <copy todir="${basedir}/bin-debug">
+            <fileset dir="${basedir}/src/main">
+                <include name="resources/**/*" />
+            </fileset>
+        </copy>
+        <copy todir="${basedir}/bin/js-debug">
+            <fileset dir="${basedir}/src/main">
+                <include name="resources/**/*" />
+            </fileset>
+        </copy>
+        <copy todir="${basedir}/bin/js-release">
+            <fileset dir="${basedir}/src/main">
+                <include name="resources/**/*" />
+            </fileset>
+        </copy>
+    </target>
+    
+    <!-- end of stuff from build_example -->
+    
+    <target name="main" depends="clean,compile,compilejs,copy-resources" 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>
+
+    
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/c9e03429/TourJS/src/main/flex/TourJS.mxml
----------------------------------------------------------------------
diff --git a/TourJS/src/main/flex/TourJS.mxml b/TourJS/src/main/flex/TourJS.mxml
new file mode 100644
index 0000000..c49ed32
--- /dev/null
+++ b/TourJS/src/main/flex/TourJS.mxml
@@ -0,0 +1,42 @@
+<?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:local="*"
+                   xmlns:js="library://ns.apache.org/flexjs/basic" 
+                   xmlns:models="models.*" 
+                   xmlns:controllers="controllers.*"
+                   width="900" height="500"
+                   >
+    <js:valuesImpl>
+        <js:SimpleCSSValuesImpl />
+    </js:valuesImpl>
+    <js:initialView>
+        <local:TourJSMainView id="mainView"  />
+    </js:initialView>
+    <!--<js:model>
+        <models:ASDocModel />
+    </js:model>
+    <js:controller>
+        <controllers:ASDocController />
+    </js:controller>-->
+    <js:beads>
+        <js:ViewSourceContextMenuOption />
+    </js:beads>
+</js:Application>

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/c9e03429/TourJS/src/main/flex/TourJSMainView.mxml
----------------------------------------------------------------------
diff --git a/TourJS/src/main/flex/TourJSMainView.mxml b/TourJS/src/main/flex/TourJSMainView.mxml
new file mode 100644
index 0000000..61b11c0
--- /dev/null
+++ b/TourJS/src/main/flex/TourJSMainView.mxml
@@ -0,0 +1,160 @@
+<?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:HView xmlns:fx="http://ns.adobe.com/mxml/2009"
+				xmlns:js="library://ns.apache.org/flexjs/express"
+				xmlns:basic="library://ns.apache.org/flexjs/basic"
+			    width="100%" height="100%" initComplete="loadInitialData()">
+    <fx:Script>
+        <![CDATA[
+			import org.apache.flex.collections.HierarchicalData;
+			import org.apache.flex.collections.converters.JSONItemConverter;
+			     
+			[Bindable]
+			private var tempExampleNames = [];
+			
+			[Bindable]
+			private var contentData:HierarchicalData;
+			
+			private var currentExamples:Array;
+			
+			private function loadInitialData():void {
+				service.url = "resources/content.json";
+				service.send();
+				service.addEventListener("complete", completeHandler);
+			}
+			
+			private function completeHandler(event:Event):void
+			{
+				var data:String = service.data as String;
+				var converter:JSONItemConverter = new JSONItemConverter();
+				var obj:Object = converter.convertItem(data);
+				contentData = new HierarchicalData(obj);
+				contentTree.dataProvider = contentData;
+			}
+			
+			private function treeChange():void
+			{
+				var node:Object = contentTree.selectedItem;
+				if (node["type"] == "group") {
+					exampleTitle.text = node["title"];
+					exampleDescription.text = node["description"];
+					codeArea.text = "";
+				} else {
+					exampleTitle.text = node["title"];
+					exampleDescription.text = node["description"];
+					codeArea.text = "";
+					
+					var exampleNames:Array = [];
+					
+					currentExamples = node["example"];
+					for (var i:int=0; i < currentExamples.length; i++) {
+						var item:Object = currentExamples[i];
+						exampleNames.push(item["name"]);
+					}
+					
+					// show the first (or only) one.
+					if (currentExamples.length > 0) {
+						showExampleSource(0);
+					}
+					
+					buttonBar.dataProvider = exampleNames;
+				}
+			}
+			
+			private function codeLoaded(event:Event):void
+			{
+				var data:String = codeLoader.data as String;
+				codeArea.text = data;
+			}
+			
+			private function codeError(event:Event):void
+			{
+				codeArea.text = "Error loading this code example";
+			}
+			
+			private function showExampleSource(index:int):void
+			{
+				var item:Object = currentExamples[index];
+				
+				codeLoader.url = "resources/" + item["source"];
+				codeLoader.send();
+				codeLoader.addEventListener("complete", codeLoaded);
+				codeLoader.addEventListener("ioError", codeError);
+			}
+			
+			private function changeExample():void
+			{
+				showExampleSource(buttonBar.selectedIndex);
+			}
+		]]>
+    </fx:Script>
+	
+	<fx:Style>
+		.Explorer {
+			background-color: #FEFEFE;
+			margin-right: 5px;
+		}
+		.ExplorerTree {
+			border: none;
+		}
+		.RunningExample {
+			margin-bottom: 5px;
+		}
+		.ExampleCode {
+			background-color: #FEFEFE;
+			border: 1px solid #000000;
+		}
+	</fx:Style>
+	
+	<js:beads>
+		<js:HTTPService id="service" />
+		<js:HTTPService id="codeLoader" />
+	</js:beads>
+	
+		<js:Panel title="Component Explorer" width="25%" height="100%" className="Explorer">
+			<basic:Tree id="contentTree" width="100%" 
+						height="100%" 
+						labelField="title" 
+						className="ExplorerTree"
+						change="treeChange()"/>
+		</js:Panel>
+		
+		<js:VContainer width="74%" height="100%">
+			<js:Panel title="Example" width="100%" height="50%" className="RunningExample">
+				<js:beads>
+					<js:VerticalLayout />
+				</js:beads>
+				<js:Label id="exampleTitle" width="100%" height="22" />
+				<js:Label id="exampleDescription" width="100%" height="22" />
+			</js:Panel>
+			
+			<js:VContainer width="100%" height="50%">
+				<js:ButtonBar id="buttonBar" width="100%" height="10%" change="changeExample()" />
+				<js:Container width="100%" className="ExampleCode" height="90%">
+					<js:beads>
+						<js:ScrollingViewport />
+					</js:beads>
+					<js:Label id="codeArea" width="100%"/>
+				</js:Container>
+			</js:VContainer>
+			
+		</js:VContainer>
+
+</js:HView>

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/c9e03429/TourJS/src/main/resources/content.json
----------------------------------------------------------------------
diff --git a/TourJS/src/main/resources/content.json b/TourJS/src/main/resources/content.json
new file mode 100644
index 0000000..ba137b0
--- /dev/null
+++ b/TourJS/src/main/resources/content.json
@@ -0,0 +1,58 @@
+{"type": "group",
+ "title": "root",
+ "children": [
+    {"type": "group",
+     "title": "Everything",
+     "description": "This is all we have",
+     "children": [
+        {"type":"group",
+         "title": "Visual Components",
+         "description": "Something about visual components",
+         "children": [
+                 {"type":"group",
+                  "title": "General Components",
+                  "description": "Something about general components",
+                  "children": [
+                 	 {"type":"component",
+                 	  "title": "Alert",
+                 	  "description": "Describe the Alert control",
+                 	  "example": [
+                 	  		{"name": "simple.mxml", 
+                 	  		 "source":"content/visualComponents/generalComponents/alert/code/simple.mxml",

+                 	  		 "module_swf":"x/y/z", 
+                 	  		 "module_js":"x/y/z"}
+                 	  	]},
+                 	 {"type":"component",
+                 	  "title":"Button",
+                 	  "description": "Describe the Button control",
+                 	  "example": [
+                 	  		{"name": "plain.mxml", 
+                 	  		 "source":"content/visualComponents/generalComponents/alert/code/simple.mxml",

+                 	  		 "module_swf":"x/y/z", 
+                 	  		 "module_js":"x/y/z"},
+                 	  		{"name": "toggle.mxml", 
+                 	  		 "source":"content/visualComponents/generalComponents/button/code/toggle.mxml",

+                 	  		 "module_swf":"x/y/z", 
+                 	  		 "module_js":"x/y/z"},
+                 	  		{"name": "radio.mxml", 
+                 	  		 "source":"content/visualComponents/generalComponents/button/code/radio.mxml",

+                 	  		 "module_swf":"x/y/z", 
+                 	  		 "module_js":"x/y/z"}
+                 	  	]},
+                 	 {"type":"component",
+                 	  "title":"Other",
+                 	  "description":"Describes something else",
+                 	  "example": [
+                 	  		{"name": "plain.mxml", 
+                 	  		 "source":"content/visualComponents/generalComponents/alert/code/simple.mxml",

+                 	  		 "module_swf":"x/y/z", 
+                 	  		 "module_js":"x/y/z"},
+                 	  		{"name": "toggle.mxml", 
+                 	  		 "source":"content/visualComponents/generalComponents/alert/code/simple.mxml",

+                 	  		 "module_swf":"x/y/z", 
+                 	  		 "module_js":"x/y/z"}
+                 	  	]}
+                  ]}
+          ]}
+    ]}
+]}

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/c9e03429/TourJS/src/main/resources/content/visualComponents/generalComponents/alert/code/simple.mxml
----------------------------------------------------------------------
diff --git a/TourJS/src/main/resources/content/visualComponents/generalComponents/alert/code/simple.mxml
b/TourJS/src/main/resources/content/visualComponents/generalComponents/alert/code/simple.mxml
new file mode 100644
index 0000000..962e820
--- /dev/null
+++ b/TourJS/src/main/resources/content/visualComponents/generalComponents/alert/code/simple.mxml
@@ -0,0 +1,24 @@
+<?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:View xmlns:fx="http://ns.adobe.com/mxml/2009"
+				xmlns:js="library://ns.apache.org/flexjs/basic"
+			    >
+	<!-- code that demonstrates Alert goes here -->
+</js:View>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-tourjs/blob/c9e03429/TourJS/src/main/resources/content/visualComponents/generalComponents/button/code/radio.mxml
----------------------------------------------------------------------
diff --git a/TourJS/src/main/resources/content/visualComponents/generalComponents/button/code/radio.mxml
b/TourJS/src/main/resources/content/visualComponents/generalComponents/button/code/radio.mxml
new file mode 100644
index 0000000..a9d7d3f
--- /dev/null
+++ b/TourJS/src/main/resources/content/visualComponents/generalComponents/button/code/radio.mxml
@@ -0,0 +1,24 @@
+<?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:View xmlns:fx="http://ns.adobe.com/mxml/2009"
+				xmlns:js="library://ns.apache.org/flexjs/basic"
+			    >
+	<!-- code that demonstrates Radio Button goes here -->
+</js:View>
\ No newline at end of file


Mime
View raw message