wpDeleteFromObjUseList
This instance method is called to remove an item type from an object's in-use list.
Syntax
_wpDeleteFromObjUseList(somSelf, pUseItem)
Parameters
- somSelf (WPObject *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPObject.
- pUseItem (PUSEITEM) - input
- Pointer to a USEITEM structure.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE: Successful completion.
- FALSE: Error occurred.
Remarks
This method will remove a specified item type from an object's in-use (USEITEM) list. If the usage item being removed is of type USAGE_OPENVIEW, the in-use emphasis bit will be turned off for all inserted records for this object.
Usage
A call to this method should be made when a particular usage item, added to the in-use list via the wpAddToObjUseList method, is no longer needed. This method must be called before the USEITEM memory is freed.
How to Override
This method is generally not overridden.
Example Code
In this example, when the last view of a MYFOLDER object is closed, we zero out its first view instance variable, so that the next time it has a first view opened, we can keep track of that.
SOM_Scope BOOL SOMLINK myfold_wpDeleteFromObjUseList(MYFOLDER *somSelf, PUSEITEM pUseItem ) { MYFOLDERData *somThis = MYFOLDERGetData(somSelf); PUSEITEM pItem; BOOL rcParentCall; MYFOLDERMethodDebug("MYFOLDER","myfold_wpDeleteFromObjUseList"); /* Call parent's method first */ rcParentCall = parent_wpDeleteFromObjUseList(somSelf, pUseItem); pItem = _wpFindUseItem(somSelf, USAGE_OPENVIEW, NULL); if (!pItem) { _setFirstViewHandle(somSelf, NULLHANDLE); } /* endif */ return( rcParentCall ); }