You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2012/05/14 15:48:01 UTC

svn commit: r1338198 - in /pivot/trunk/tutorials/www: hello-bxml.xml hello-world.xml

Author: smartini
Date: Mon May 14 13:48:00 2012
New Revision: 1338198

URL: http://svn.apache.org/viewvc?rev=1338198&view=rev
Log:
Updates to some Tutorials

Modified:
    pivot/trunk/tutorials/www/hello-bxml.xml
    pivot/trunk/tutorials/www/hello-world.xml

Modified: pivot/trunk/tutorials/www/hello-bxml.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/hello-bxml.xml?rev=1338198&r1=1338197&r2=1338198&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/hello-bxml.xml (original)
+++ pivot/trunk/tutorials/www/hello-bxml.xml Mon May 14 13:48:00 2012
@@ -103,6 +103,24 @@ limitations under the License.
         </source>
 
         <p>
+		    You can run this example as a Standard Java Application executing ScriptApplication in the following way:<br/>
+			org.apache.pivot.wtk.ScriptApplication --src=/org/apache/pivot/tutorials/hello.bxml
+        </p>
+
+        <p>
+            Note that you can even add the main() method to be able to run the class as 
+            Standard Java Application in the usual way.
+        </p>
+        <source type="java" location="org/apache/pivot/tutorials/HelloBXML.java">
+            <![CDATA[
+                public static void main(String[] args) {
+                    DesktopApplicationContext.main(HelloBXML.class, args);
+                }
+            ]]>
+        </source>
+
+
+        <p>
             Most Pivot applications will be constructed this way, declaring the structure of the
             UI in BXML rather than creating it programmatically in code. However, event handlers,
             which allow an application to respond to user input, are always defined in code (either
@@ -161,6 +179,11 @@ limitations under the License.
         </p>
 
         <p>
+		    You can run this example as a Standard Java Application executing ScriptApplication in the following way:<br/>
+			org.apache.pivot.wtk.ScriptApplication --src=/org/apache/pivot/tutorials/hello_javascript.bxml
+        </p>
+
+        <p>
             The class is named <tt>ScriptApplication</tt> because it is often used to launch
             applications whose logic is defined entirely in script; however, it can actually be
             used to launch any application whose main window is defined in a single BXML file. Many
@@ -169,17 +192,14 @@ limitations under the License.
         </p>
 
         <p>
-            Note that you can even add the main() method to be able to run the class as 
-            Standard Java Application in the usual way.
+		    Accessing BXML resources is the same as accessing any other kind of resources from within a Java application,
+			following the same rules of standard ClassLoader resource retrieval methods.
+			<br/>
+			Note that it's not mandatory to use BXML files within Pivot (all could be done in Java or any JVM compatible language),
+			but BXML is a much more convenient method for specifying the UI layout.
         </p>
-        <source type="java" location="org/apache/pivot/tutorials/HelloBXML.java">
-            <![CDATA[
-                public static void main(String[] args) {
-                    DesktopApplicationContext.main(HelloBXML.class, args);
-                }
-            ]]>
-        </source>
 
+        <br/>
 
     </body>
 </document>

Modified: pivot/trunk/tutorials/www/hello-world.xml
URL: http://svn.apache.org/viewvc/pivot/trunk/tutorials/www/hello-world.xml?rev=1338198&r1=1338197&r2=1338198&view=diff
==============================================================================
--- pivot/trunk/tutorials/www/hello-world.xml (original)
+++ pivot/trunk/tutorials/www/hello-world.xml Mon May 14 13:48:00 2012
@@ -222,5 +222,8 @@ limitations under the License.
             "Hello World" label. Though skins are not required to provide styling support, most
             will provide similar capabilities.
         </p>
+
+        <br/>
+
     </body>
 </document>