As you can see in the previous "Hello World" example, the WMLScript code is stored in plain-text form. Before the WMLScript file reaches the wireless device, it passes through a WAP gateway that compiles the WMLScript code. The byte code resulted is then transferred to the wireless device where it is executed.
Typically, there is no need to care about the WAP gateway part, as cellular network operators will provide a WAP gateway for their subscribers.
Although WAP gateways will take care of the compilation of WMLScript files for you, you can compile them manually if you want to (maybe for purposes such as checking syntax errors). All you need is a WMLScript compiler. One is available in the Nokia Mobile Internet Toolkit, which can be downloaded free of charge on Nokia's website.
To compile a WMLScript file using the Nokia Mobile Internet Toolkit, follow the steps below:
Run the Nokia Mobile Internet Toolkit
Click "File -> Open"
In the dialog box, choose the WMLScript file you want to compile and click the "Open" button
Click the "Compile" button in the bottom left-hand corner
If there is no compile-time error, the compiled file (ends with the extension ".wmlsc") will be saved and placed in the same directory as the original plain-text file.
|Previous Page||Page 3 of 71||Next Page|
- 1. WMLScript Introduction
- 2. Hello World WMLScript Example
- 3. Compiling WMLScript Code
- 4. WMLScript Language Rules
- 5. Defining WMLScript Functions
- 6. Calling WMLScript Functions
- 7. WMLScript Variables
- 8. WMLScript Data Types
- 9. WMLScript Variables Vs WML Variables
- 10. Passing Arguments to Functions By Value and By Reference
- 11. WMLScript Operators
- 12. WMLScript Conditional Statements
- 13. WMLScript Looping Statements
- 14. WMLScript Standard Libraries Overview
- 15. WMLScript WMLBrowser Standard Library
- 16. WMLScript Dialogs Standard Library
- 17. WMLScript String Standard Library
- 18. WMLScript Float Standard Library
- 19. WMLScript Lang Standard Library
- 20. WMLScript URL Standard Library
- 21. WMLScript Example: Validating Form Data