CHAPTER 5 STORING AND RETRIEVING APPLICATION DATA (Zeus web server)

CHAPTER 5 STORING AND RETRIEVING APPLICATION DATA Object Property Value PushButton16 Name DivisionButton Caption / PushButton17 Name EqualsButton Caption = PushButton18 Name OffButton Caption Off PushButton19 Name ClearButton Caption Clear The next step in creating the RBCalculator application is to design its menu system. Double- click the menu bar item located on the Projects screen to open the MenuBar Editor. Delete the Edit menu. Then, modify the menu system for Menubar1 by adding a Help menu, and then add an About menu item beneath it. Assign &Help and &About as the value of the Text properties for each respective control. At this point, the user interface for the RBCalculator application is finished. Now, you are ready to begin writing the code statements required to make the application work. Supplying Application Code Let s start adding the code statements associated with the Help menu s About menu item. To do so, open the application s window in the REALbasic Code Editor and switch over to code view. Click the Add Menu Event Handler button located on the Window Editor toolbar. A menu handler entry is added to the left-hand browser area in the Code Editor. Select the entry for the HelpAbout menu item from the drop-down list for the MenuItem Name field and enter the following program statement. MsgBox(”RBCalculator - Written By Jerry Ford - 2006″) This statement uses the MsgBox function to display information about the application s author in a preformatted pop-up dialog window. Now that the application s menu system is ready to go, it s time to provide the code associated with each of the application s PushButton controls. For starters, add the following code statement to the method belonging to each of the PushButton controls that represents a numeric calculator button, as well as to the button representing a toggle value (for example, the PushButtons labeled 0 9 and -). OutputField.Text = OutputField.Text + Me.Caption This statement, when executed, adds the number of the appropriate PushButton control to the EditField control. For example, if the user clicks the PushButton control representing the number 5, this statement takes the value of that PushButton control s Caption (for example 5), which it gets from Me.Caption, and appends it to whatever text is currently displayed in the EditField control.
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.

Leave a Reply