|
of_resetupdate
|
|
Full name
|
pfc_n_cst_tvsrv_levelsource.of_resetupdate
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_resetupdate(integer)
|
Name
|
Datatype
|
li_Cnt
|
Integer
|
li_Index
|
Integer
|
li_Start
|
Integer
|
public function integer of_resetupdate (integer ai_level);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_ResetUpdate
//
// Access: public
//
// Arguments:
// ai_Level The level for which to reset the update flags of its
// 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 - the flags were reset successfully
// -1 - an error occurred
//
// Description: Reset the update flags for a DataStore associated with a level of the TreeView.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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
// If level > li_Index then inv_attrib[li_Index] must be recursive
If Not inv_attrib[li_Index].ib_Recursive Then Return -1
ai_Level = li_Index
End If
li_Start = ai_Level
End If
li_Index = UpperBound(inv_attrib)
If ai_Level = 0 Then
// Update all DataStores
li_Start = 1
Else
If ai_Level > li_Index Then
// If level > li_Index then inv_attrib[li_Index] must be recursive
If Not inv_attrib[li_Index].ib_Recursive Then Return -1
ai_Level = li_Index
End If
li_Start = ai_Level
End If
// Reset the Update flags(s)
For li_Cnt = li_Start To li_Index
If IsValid(inv_attrib[li_Cnt].ids_obj) Then
If inv_attrib[li_Cnt].ids_obj.ResetUpdate() = -1 Then Return -1
End If
Next
Return 1
end function
Name
|
Owner
|
datastore.resetupdate |
datastore
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|