<< Click to Display Table of Contents >> Navigation: IWML Tutorial > Hello World |
Piddler
For this and every sample we will display them using our Piddler application (a mini Fiddler). Piddler is written in IntraWeb 17. By using this tutorial, you are already using a live IntraWeb 17 application.
Using Piddler, you can click show to run the IWML and see the output. If you want to make changes and play with the IWML click Edit first, make your changes, then click Show.
If you goof up, you can click Reset. Reset will appear after you click Edit.
Hello World
Below is the most simplistic IWML that actually does something. It is valid to declare an empty page, but it will not display anything and is generally not useful. In this example, we display only very simple text.
Click Show to try it out!
[iw-app]
Let's break it down piece by piece.
[az-diff file=File01.iwml]
Every IWML document is also an ACORN (Atozed Compact Object Readable Notation) document. Thus, every IWML document must start out with an ACORN header to identify it as an ACORN document, as well as the IWML sub type. This header is always as is and never changes unless the ACORN or IWML version is increased.
[az-diff file=File02.iwml]
Every IWML document requires a root page tag. The are variations we will cover later when there is additional code behind, but the generic declaration is simply Page.
In this tutorial we will not be covering code, only IWML. If you want to add code from JavaScript, TypeScript, Delphi or any of the other languages, please check out the language specific tutorials after you complete this IWML tutorial.
[az-diff file=File03.iwml]
In this example we have a single control and we are using the short form for the control of control tag name, space, parameter(s). In this example we specify the Text control and a parameter of Hello World.
Some controls support multiple parameters, and the meaning of the parameter is control dependent. For a Text control, the parameter maps to the .Text property of the Text control.
A Few Quick Notes
Case
IWML is not case sensitive. Page and page are identical.
Blank Lines
Blank lines are ignored unless they are inside a multi-line property value. This means you can use this IWML and it will still work.
[az-diff file=File04.iwml]
This allows you to easily segregate sections of your IWML file to your personal liking. This becomes very useful as the size of your IWML files grow.
Comments
Comments are denoted by any line that begins with # (not counting any leading spaces).
[az-diff file=File05.iwml]