of_validation


pfcmain.pbl   >   pfc_w_master   >   of_validation   

Full name pfc_w_master.of_validation
Access public
Override of integer
Return value integer
Prototype public function integer of_validation()

Name Datatype
No Data

Name Datatype
lpo_pending powerobject[]
lpo_updatearray powerobject[]
lpo_validatearray powerobject[]

public function integer of_validation ();//////////////////////////////////////////////////////////////////////////////
//
//	Function:
//	of_Validation
//
//	Access:  		public
//
//	Arguments:  none
//
//	Returns:  integer
//	 1 = All validation passed
//  0 = No Action
//	-1 = validation failed
//
//	Description:
//	Perform validation logic.
//
// Note:
//	Specific Validation logic should be coded in descendant pfc_validation event.
//	Part of the SelfUpdatingObject(SUO) API.
//	No Action will be executed, If the object is not Updateable.
//
//////////////////////////////////////////////////////////////////////////////
//	
//	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.
//
//////////////////////////////////////////////////////////////////////////////

powerobject lpo_updatearray[]
powerobject lpo_validatearray[]
powerobject lpo_pending[]

// Make sure there is something to take action on.
If Not of_IsUpdateable() Then Return NO_ACTION

If ib_alwaysvalidate Then
	// Don't need to know the objects with updatespending.
	If UpperBound(ipo_updateobjects) > 0 Then
		lpo_validatearray = ipo_updateobjects
	Else
		lpo_validatearray = This.Control		
	End If
Else
	If UpperBound(ipo_pendingupdates) > 0 Then
		// Should be part of a SUO unit.
		lpo_pending = ipo_pendingupdates
	Else
		// Might not be part of an SUO unit.  Need to know what objects had updatespending. 
		If UpperBound(ipo_updateobjects) > 0 Then
			lpo_updatearray = ipo_updateobjects
		Else
			lpo_updatearray = This.Control		
		End If
		If this.Event pfc_UpdatesPendingRef(lpo_updatearray, lpo_pending) < 0 Then
			Return -1
		End If
	End If
	lpo_validatearray = lpo_pending
End If

Return this.Event pfc_validation(lpo_validatearray)
end function

     
Name Owner
No Data

     
Name Owner
systemfunctions.upperbound systemfunctions
pfc_w_master.of_isupdateable pfc_w_master
pfc_w_master.pfc_validation pfc_w_master
pfc_w_master.pfc_updatespendingref pfc_w_master

     
Full name
No Data

     
Name Scope
No Data