This is an automated email from the ASF dual-hosted git repository.
andreww pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-docs.git
The following commit(s) were added to refs/heads/develop by this push:
new cf26c3f Update build.md
cf26c3f is described below
commit cf26c3f8c9b38b01a4b100943992fd20a500b824
Author: Andrew Wetmore <[email protected]>
AuthorDate: Thu Feb 1 11:12:37 2018 -0400
Update build.md
Some minor text changes, plus a link to the Tools page.
---
create-an-application/application-tutorial/build.md | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/create-an-application/application-tutorial/build.md
b/create-an-application/application-tutorial/build.md
index 7e91961..de79f27 100644
--- a/create-an-application/application-tutorial/build.md
+++ b/create-an-application/application-tutorial/build.md
@@ -20,7 +20,7 @@ title: Build the application
# Build the application
-In many other HTML/JS/CSS development models, you write the JS and then just
view it in the browser. Royale uses a compiler to convert your MXML and
ActionScript code into HTML/JS/CSS. Why? Because there is a philosophy that
the sooner you catch a bug, the less expensive it is to fix it. So the
compiler scans all of your source code to make sure that it makes sense. The
compiler checks that there aren't typos in property names, that if you are
expecting a String you'll probably get [...]
+In many other HTML/JS/CSS development models, you write the JS and then just
view it in the browser. Royale uses a compiler to convert your MXML and
ActionScript code into HTML/JS/CSS. Why? Because there is a philosophy that the
sooner you catch a bug, the less expensive it is to fix it. The compiler scans
your source code to make sure that it makes sense. The compiler checks that
there aren't typos in property names, that if you are expecting a String you'll
probably get one, and more.
The main MXML file should now look like this:
@@ -102,13 +102,15 @@ initialize="addEventListener('dataReady',
dataReadyHandler);configurator.send()"
</js:Application>
```
-Before we compile this code, there are a few things we want to add. First
off, there is no way to know if a "var" has changed. So, we want to tell the
compiler to convert the var into a get/set property so we can detect changes.
Otherwise, you will get a warning that assignment to some variable cannot be
detected. In Royale, this is done via MetaData. Metadata consists of square
brackets "[]" which contain a tag and some attributes. The compiler knows to
act on some MetaData. Oth [...]
+Before we compile this code, there are a few things we want to add.
-Another thing missing is that we haven't specified the size of the controls.
Just like HTML/JS/CSS there are multiple ways to do this. We could have a
separate .css file and specify styles there and assign class names in the MXML
tags. That allows the CSS to be tweaked without recompiling so you can just
refresh the browser and see changes, but in Royale, the CSS file is actually
generated by the compiler from the CSS file in your source code and CSS files
in the libraries you used so [...]
+First, there is so far no way to know if a "var" has changed. So we want to
tell the compiler to convert the var into a get/set property so we can detect
changes. Otherwise, you will get a warning that assignment to some variable
cannot be detected. In Royale, this is done via MetaData. Metadata consists of
square brackets "[]" which contain a tag and some attributes. The compiler
knows to act on some MetaData. Other MetaData can be compiled into the code and
used at runtime. To convert [...]
-This simple example will look fine if we just set the width and height of the
DataGrid and the width of the MultilineLabel, so we will add them directly.
You can read the section on Styles to see other ways of setting styles on the
View.
+Another thing missing is that we haven't specified the size of the controls.
As with HTML/JS/CSS, there are several ways to do this. We could have a
separate .css file, specify styles there and assign class names in the MXML
tags. That allows the CSS to be tweaked without recompiling so you can just
refresh the browser and see changes; but in Royale, the CSS file is actually
generated by the compiler from the CSS file in your source code and CSS files
in the libraries you used. So if you [...]
-The final code should look like this: (you can download it from
[here](https://github.com/apache/royale-asjs/blob/develop/examples/express/GitHubCommitLogViewer/src/main/royale/GitHubCommitLogViewer.mxml))
+This simple example will look fine if we just set the width and height of the
DataGrid and the width of the MultilineLabel, so we will add them directly. You
can read the section on Styles to see other ways of setting styles on the View.
+
+The final code should look like this: (you can download it from
[here](https://github.com/apache/royale-asjs/blob/develop/examples/express/GitHubCommitLogViewer/src/main/royale/GitHubCommitLogViewer.mxml).)
```XML
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
@@ -189,7 +191,7 @@ initialize="addEventListener('dataReady',
dataReadyHandler);configurator.send()"
</js:Application>
```
-Since we are intersted in JS output, to compile this code, we run:
+Since we are interested in JS output and you're using an
[IDE](Welcome/Get_Started/Development-tools.html), set that output target in
the project before compiling. If you're using command-line scripts, run:
```
<path to Royale SDK>/royale-asjs/js/bin/mxmlc -debug=true
GitHubCommitLogViewer.mxml
@@ -201,7 +203,7 @@ If you've used NPM to install Royale, you can just run:
mxmlc -debug=true GitHubCommitLogViewer.mxml
```
-This should compile with one warning. We will ignore that for now and fix it
later. Next, let's see the results.
+This should compile with one warning. We will ignore that for now and fix it
later. Next, let's see the results.
{:align="center"}
[Previous Page](create-an-application/application-tutorial/controller.html) \|
[Next Page](create-an-application/application-tutorial/deploy.html)
--
To stop receiving notification emails like this one, please contact
[email protected].