Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 23. Database Events > The Object Model

The Object Model

To examine the classes and commands in the Database Events application, open its dictionary. In Leopard, you should find it listed in Script Editor’s Library window. In Tiger, if you anticipate using it often, add it to Script Editor’s Library window if it isn’t already there. To do this, choose the Library command from Script Editor’s Window menu. When the Library window opens, click the Add button (the round button with a plus sign), navigate to System > Library > CoreServices, select Database Events, and then click Open. When you see Database Events added to the Library window, select it and click the Library window’s Open button (the button that looks like a stack of books). The Database Events dictionary opens, and you can examine it at your leisure.

A database is a collection of records. The database is kept in memory unless you choose to store it using the save command, as described in a moment. Each record is a named collection of fields, and each field contains a named item of information. In AppleScript terms, a database object is an element of the Database Events application, a record is an element of a database, and a field is an element of a record. There can be an unlimited number of databases, records, and fields, and you use any AppleScript reference form to refer to them, such as by name or by index. You retrieve the values of fields and records matching complex search criteria by using AppleScript’s filter reference form (whose clauses).


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint