General Change Notification: 4 Application Local GCN Lists

Up: GEOS SDK TechDocs | Up | Down | Prev: 3 System Notification | Next: 4.1 Creating Types and Lists

The GCN mechanism not only allows you to keep track of system changes but also allows you to keep track of changes within a specific application. These application-specific GCN lists operate in slightly different manners than the system-wide application lists. There are an extensive number of pre-defined application lists for MANUFACTURER_ID_GEOWORKS. You may use these if you like, but in most cases you will want to create your own list and notification types for your application.

The GenControl objects make extensive use of these types of GCN lists when implementing changes. For a complete discussion of using these lists within the context of a GenControl, see the Controllers chapter.

If you will be creating custom GenControl objects or just wish to set up a notification system within your application, you will want to create your own application GCN lists when using this mechanism. To do this, you must follow a few preliminary steps:

The GCN mechanism in this case performs its functions through a common series of steps. These steps are similar to the steps needed for system-wide notification:

  1. The object registers for notification with MSG_META_GCN_LIST_ADD .
  2. The change occurs within your application and invokes your own custom method. Because the change occurs within your application, you are responsible for detecting the change and sending out notification yourself.
  3. Record the notification event with MSG_META_NOTIFY or MSG_META_NOTIFY_WITH_DATA_BLOCK , the notification list type to use, and the data block to pass (if applicable).
  4. Use MSG_GEN_PROCESS_SEND_TO_APP_GCN_LIST to pass the event. You may have to pass some GCNListSendFlags with this message. This message acts as a dispatch routine, sending all interested parties the recorded event MSG_META_NOTIFY .
  5. The object is informed of the change with MSG_META_NOTIFY or MSG_META_NOTIFY_WITH_DATA_BLOCK . If you need to perform some work related to this change, you should have a message handler to intercept these messages.

Up: GEOS SDK TechDocs | Up | Down | Prev: 3 System Notification | Next: 4.1 Creating Types and Lists