of_reset


pfcapsrv.pbl   >   pfc_n_cst_tvsrv_levelsource   >   of_reset   

Full name pfc_n_cst_tvsrv_levelsource.of_reset
Access public
Extend of integer
Return value integer
Prototype public function integer of_reset(integer)

Name Datatype
No Data

Name Datatype
li_cnt integer
li_index integer
li_start integer

public function integer of_reset (integer ai_level);//////////////////////////////////////////////////////////////////////////////
//
//	Function:	of_Reset
//
//	Access:		public
//
//	Arguments:  
//	ai_Level		The level for which to reset the DataStore.  If ai_Level is 0, 
//						all DataStores will be updated.
//						NOTE:  There is only one DataStore for all 
//						recursive levels.  So if ai_Level is a recursive level, 
//						all levels using that DataStore will be updated.
//
//
//	Returns:  Integer
//	 1 if it succeeds
//	-1 if an error occurs.
//	
//	Description:
//	Reset the treeview datastores.
//
//////////////////////////////////////////////////////////////////////////////
//	
//	Revision History
//
//	Version
//	6.0  Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
integer	li_index, li_start, li_cnt


// check arguments
If isNull(ai_level) or (ai_level < 0) Then Return -1

li_Index = UpperBound(inv_attrib)
If ai_Level = 0 Then
	// Update all DataStores
	li_Start = 1
Else
	If ai_Level < li_Index Then
		li_Index = ai_Level
	End If
	
	li_Start = li_Index
End If

// reset the datastores
For li_Cnt = li_start to li_index
	If IsValid(inv_attrib[li_Cnt].ids_obj) Then
		If inv_attrib[li_Cnt].ids_obj.Reset() <> 1 Then Return -1
	End If
End For

Return 1
end function

     
Name Owner
pfc_n_cst_tvsrv_levelsource.of_reset pfc_n_cst_tvsrv_levelsource

     
Name Owner
datastore.reset datastore
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.upperbound systemfunctions

     
Full name
No Data

     
Name Scope
No Data