GEOS SDK TechDocs
|
|
3.2 Handling System Notification
|
4 Application Local GCN Lists
You should use
GCNListRemove()
to remove an object from a system GCN list. You must pass the notification ID (
GCNStandardListType
and Manufacturer ID) and the optr of the object to be removed. The optr of the object in question will only be removed from the list of the particular change specified. If the optr is on several GCN lists, those other lists will remain unchanged.
An object or process in the course of dying must remove itself from all GCN lists that it is currently on. You should therefore keep track of all GCN lists you add a particular object to. It is usually convenient for a process to remove itself from these lists within its
MSG_GEN_PROCESS_CLOSE_APPLICATION
message handler or for an object to remove itself in its
MSG_META_DETACH
handler.
Code Display 9-2 Removing a Process from a GCN list
@method MyProcessClass, MSG_GEN_PROCESS_CLOSE_APPLICATION {
optr myThread;
myThread = ConstructOptr(GeodeGetProcessHandle(), NullChunk);
GCNListRemove(myThread, MANUFACTURER_ID_GEOWORKS, GCNSLT_FILE_CHANGE);
@callsuper;
}
GEOS SDK TechDocs
|
|
3.2 Handling System Notification
|
4 Application Local GCN Lists