Data Structures | ||
WARNING! Do not proceed unless you have looked at and understood the topics called "Custom Classes" and "Arrays". We will be creating an array of a custom class. | ||
Databases and Data Structures: | ||
![]() | ||
For those familiar with FileMaker Pro terminology the names used are different but their functional meanings are the same: The programmer creates the table by deciding what columns (fields) it should have. A Table (Layout) can have as many columns (fields) as the programmer deems necessary. Rows (records) are added to a table by the user when he or she inputs data into the table’s columns (fields). A table then, is like a multi-columned listbox. The difference is that a table exists in memory or in a database file; not on a project window as does a listbox. As we will see this can be very helpful in certain situations. Because of their structural compatibility listboxes are very commonly used to display table data and database tables are often used to store data that has been entered into a listbox. On to Data Structures: We will use a custom class called “box1Data” to create the data structure. box1Data will have two properties: firstName as string, and lastName as string. | ||
![]() | ||||
![]() | ||||
We will also need to create some global properties so we need to add a module to the project called "dataGlobals". This module will have two properties: box1Array(0) as box1Data and gBox1Count as integer. | ||
![]() | ||
With the first property, "box1Array(0) as box1Data", we create an array of box1Data class objects. When box1Data objects are added to this array each object will be like the rows of a database. Each box1Data object in the array will have its own firstName and lastName properties to hold client first and last names. | ||
![]() | ||||
box1Data objects | ||||