Now that we have given you general information about resources, forms, and form objects, we will add them to the Sales application. We’ll show you the resource definitions of all the forms, alerts, and help text. We won’t show you all the code, however, as it would get exceedingly repetitious and not teach you anything new. In particular, we won’t show the code to bring up every alert. We also postpone adding the table to the order form until Section 8.2.
We cover the forms and the code for them in order of increasing complexity. This yields the following sequence:
The Delete Customer dialog
The Edit Customer form
The Item Details form
The Customers form
All the resources are shown in text as PilRC format. (This format is easier to explain than a bunch of screen dumps from Constructor.)
Here are the defines for the alert IDs and for the buttons in the Delete Item alert (this is the alert that has more than one button):
#define RomIncompatibleAlert 1001 #define DeleteItemAlert 1201 #define DeleteItemOK 0 #define DeleteItemCancel 1 #define NoItemSelectedAlert 1000 #define AboutBoxAlert 1100
Here are the alerts themselves:
ALERT ID NoItemSelectedAlert INFORMATION BEGIN TITLE "Select Item" MESSAGE "You must have an item selected to perform this command. " \ "To select an item, tap on the product name of the item." BUTTONS "OK" END ALERT ID RomIncompatibleAlert ERROR BEGIN TITLE "System Incompatible" MESSAGE ...