CHAPTER 5 STORING AND (Web hosting ratings) RETRIEVING APPLICATION DATA

CHAPTER 5 STORING AND RETRIEVING APPLICATION DATA Similarly, you could delete all the elements stored in a dictionary using the Clear method, as shown here. strNamesDictionary.Clear Note Compared to working with arrays, dictionaries provide a more efficient means of storing large amounts of data. Just as important, if your applications need to process large amounts of data, such as thousands of customer records, the dictionary object provides significantly faster lookup and retrieval when compared to arrays. Constants As useful as variables may be for storing individual pieces of data that don t belong to a specific object, at times, you may want to consider using constants instead. A constant is a known value that does not change during the execution of your application. For example, the value of pi is a perfect example of such a value. Placing data that does not change in a constant instead of a variable provides you with several advantages. REALbasic can compile your application more efficiently because constants require less memory than variables. In addition, by storing data in a constant instead of a variable, you eliminate the possibility of accidentally changing the value of the data when your application runs. REALbasic s Built-In Constants REALbasic provides your application with access to all sorts of constants. One such constant is DebugBuild. DebugBuild returns a Boolean value of True or False, depending on whether your application is being tested within REALbasic s IDE or running as a standalone application. By checking the value returned by DebugBuild, you can add code to your applications that executes conditionally based on the current execution environment, as the following shows. If DebugBuild = True Then //The application is running in the IDE … End If Another constant you may find useful is RBVersion, which returns a number indicating the major and minor version number of REALbasic. This information comes in handy if you are working with REALbasic functionality tied to a specific version of REALbasic. This might be the case if you previously developed REALbasic programs for a previous release of REALbasic that used features no longer supported by the current version of REALbasic. For example, the following statements can be used to display a warning message if you attempt to run a REALbasic application running REALbasic version 5 or later. If RBVersion > 5 Then MsgBox “This application uses features not supported after REALbasic 5.” End If
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Leave a Reply