![]() |
![]() |
![]() |
![]() |
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 appended to the code area. This code can be used as is, combined with other user code, or edited to meet particular needs.
The first panel of the Code Sourcerer contains eleven 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.
- Declare a new variable... Create a new variable of any type and optionally initialize it.
- Applet-only operations... These options can only be performed by an Applet. (They require a web browser.)
- File operations... Read, write, or modify files. These operations cannot be performed by an Applet.
- Printing operations... Print a part, some text, or create a complex print job.
- Window operations... Create or destroy secondary windows.
- Java system operations... Interact with the Java Virtual Machine or the Operating System. (Some of these cannot be performed by an Applet.)
- Network operations... Set up and use a network connection, using either the TCP or UDP protocol.
- Miscellaneous... Font, Image, Beep, Clipboard, Email, more...
- Java Language operations... Conditional statements (if, if else) and loop statements.
Data Representations, Inc. http://www.datarepresentations.com support@datarepresentations.com sales@datarepresentations.com |
![]() |
![]() |
![]() |
![]() |