Documents: 1.2 Document Control Overview: Document Control Interaction

Up: GEOS SDK TechDocs | Up | Prev: 1.1 The Document Control Objects | Next: 1.3 Document Control Models

A simple user operation will usually involve all three types of objects. For example, suppose the user selects the Open trigger from the File menu. The following actions will be taken:

  1. The Open trigger sends a MSG_GEN_DOCUMENT_CONTROL_INITIATE_OPEN_DOC to the GenDocumentControl object. The GenDocumentControl object responds by displaying a file selector.
  2. When the user selects a file and clicks "OK," the GenDocumentControl object gets the selected file's path from the file selector object.
  3. The GenDocumentControl object sends a MSG_GEN_DOCUMENT_GROUP_OPEN_DOC to the GenDocumentGroup, passing the name and path of the file to open.
  4. The GenDocumentGroup creates a document object, either of class GenDocumentClass or of a programmer-specified class. The GenDocumentGroup object sends a MSG_GEN_DOCUMENT_OPEN to the document object, passing the file and path name to be opened.
  5. The document object opens the file specified and handles errors appropriately. It then sends messages to the application instructing it to create the UI and initialize the file.

Most of these steps are transparent to the application programmer. Typically, an application will intercept MSG_GEN_DOCUMENT_INITIALIZE_DOCUMENT_FILE ; the programmer needs only to write this handler, not all the code needed for the above steps.


Up: GEOS SDK TechDocs | Up | Prev: 1.1 The Document Control Objects | Next: 1.3 Document Control Models