ItemPTR
(Available in 00 TS Tools(Base) - TS_Tools_PointerSafe)
Purpose
Get a pointer to the current item
Syntax
pItemPointer:=oPointerSafe:ItemPTR
Arguments
Description
Get a pointer to the current item, This access is provided for the application programmer and can be used to navigate ( iterate ) the data items. The properties 'ItemCount' and 'ItemIndex' are used to initalize the number of items and to set the index. Navigating ( iterating ) the 'array' of data items can be performed by using the 'ItemNext()','ItemPrevious()','ItemFirst' and 'ItemLast()' methods.
Returns
pRetVal = PTR
Example
METHOD UsingThePointerSafe( ) CLASS MyObject
LOCAL oPointerSafe AS TS_PointerSafe
LOCAL pItem AS PTR
oPointerSafe:=TS_PointerSafe{ SELF, 10, _SIZEOF( _WinGUID ) }
oPointerSafe:ItemAdd( TS_GUID_IDispatch( ) )
oPointerSafe:ItemAdd( TS_GUID_IUnknown( ) )
oPointerSafe:ItemAdd( TS_GUID_ITypeInfo( ) )
IF oPointerSafe:ItemLocate( TS_GUID_ITypeInfo( ) )
oPointerSafe:ItemDel( oPointerSafe:ItemIndex )
END
IF !oPointerSafe:ItemLocate( TS_GUID_ITypeInfo( ) )
oPointerSafe:ItemAdd( oPointerSafe:ItemIndex )
END
oPointerSafe:ItemFirst( )
WHILE pItem<>NULL_PTR
IF pItem<>NULL_PTR
SELF:UseItem( pItem )
END
pItem:=oPointerSafe:ItemNext(