![]() |
![]() |
![]() |
![]() |
Using the Code Sourcerer
Every code area in the Composer has a Code Sourcerer button. When the user presses this button, a dialog will appear which will guide the user through a context-sensitive set of pages. By making a few selections, and filling in a few entry fields the user can construct Java statements to perform a wide variety of activities.
The Code Sourcerer presents the user with a series of panels. Once finished with a panel, the user can proceed to the next panel by pressing the Next button. The user can return to a previous panel using the Back button. At any time the user can quit the Code Sourcerer by pressing the Cancel button. Once the Code Sourcerer has obtained enough information to completely write the requested code, the Done button will become enabled. Pressing Done will write the code. Each of these buttons will become enabled/disabled in a context-sensitive manner. In some cases, both Next and Done will be disabled. This indicates that there are still critical fields to be filled in before the Code Sourcerer can proceed.
Each time the Code Sourcerer is invoked, the code which is produced is added to the code area. This code can be used as is, combined with other user code, or edited to meet particular needs. The code will be appended to the end of the code area unless the control key is held down when the Code Sourcerer is pressed.
The first panel of the Code Sourcerer contains ten categories. The user can choose from
- Change a property of an existing part... Choose a part and then modify any attribute of the part.
- Ask a part about one of its properties... Choose a part and then retrieve the value of any attribute.
- Palm OS Platform Database operations... Interact with the Palm OS Platform database, which is used to store information on Palm OS Platform devices.
- Palm OS Platform Beaming operations... Send messages to another machine via the built-in infrared port of a Palm OS Platform based handheld computer.
- Palm OS Platform Screen Painting... Draw lines and other shapes on the screen, redraw a part or parts, clear the screen.
- Palm OS Platform Network operations... Get the contents of a web page or connect to another machine over the internet.
- Palm OS Platform Spotlet operations... Show help text, switch to another spotlet, respond to different buttons.
- Perform floating point computations... Obtain the results of a floating point computation.
- Declare a new variable... Create a new variable of any type and optionally initialize it.
- Miscellaneous... Play a sound, get the ID of your machine, more...
- Java system operations... Interact with the Java Virtual Machine or the Palm OS Platform.
- Java Language Statements... Conditional statements (if, if else) and loop statements.
Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |
![]() |
![]() |
![]() |
![]() |