Create the First Deck
First, use the Display Deck Wizard to create the card that greets a user when the application is first accessed:
-
Double-click anywhere on the Application Map to display the Add Deck dialog box shown in Figure 3.6.
-
Double-click Display Deck Wizard.
-
In the first page of the wizard, type Welcome as the Deck Name, as shown in Figure 3.7.
-
The Title, HelloWorld, is the project name you supplied earlier. You can accept the default or enter your own title if you want.
-
If you want to change the title for all decks in the project, you can use the Settings dialog box (choose Tools, Setting) instead.
-
Type Greetings, galaxy! as the display text.
-
Check Show Advanced Options. This activates the next page of the wizard, where you can specify other options.
-
Click Next.
-
In Advanced Options, shown in Figure 3.8, uncheck the Enable Back Key check boxthe first deck in your application doesn't need a Back key.
-
Don't worry about all the other options available in the wizard; we'll discuss them in greater detail later.
-
Check Show Generated Code. This tells the wizard to show you the markup code that will be generated.
-
Click Next.
-
The WML code that will be generated by the wizard is displayed; see Figure 3.9 for an example. Take a look at the code and click Finish.
Figure
3.6
Choose your wizard type in the Add Deck dialog box.
Figure
3.7
Define the card in the first page of the wizard.
Figure
3.8
The Advanced Options page is optional.
Figure
3.9
Look at all the code you didn't have to write!
The deck and default card are added to the Application Map, as you can see in Figure 3.10.
Figure
3.10
The deck and card are shown as rectangles on the Application Map.