|
of_update
|
|
Full name
|
pfc_n_cst_dwsrv_linkage.of_update
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_update(boolean,boolean)
|
Name
|
Datatype
|
lb_focusonerror
|
boolean
|
li_rc
|
integer
|
public function integer of_update (boolean ab_accepttext, boolean ab_resetflags);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_Update (Format 3)
//
// Access: Public
//
// Arguments:
// ab_accepttext: Automatically perform an AcceptText prior to update
// ab_resetflags: Automatically reset datawindow update flags
//
// Returns: Integer
// 1 if it succeeds and -1 if an error occurs.
//
// Description: Updates the linked datawindows in the direction indicated by
// the ii_updatestyle attribute.
//
// *Note: Typically called from the root datawindow to affect all datawindows
// in the chain, but may be started anywhere in the chain.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 6.0 Added support for the UpdateStyle attribute.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_rc
boolean lb_focusonerror = False
// Verify passed arguments.
IF IsNull ( ab_accepttext ) Or IsNull ( ab_resetflags ) THEN Return -1
// Perform AcceptText processing (all datawindows) prior to update.
IF ab_accepttext THEN
IF of_Accepttext (lb_focusonerror) <> 1 THEN Return -1
END IF
// Perform the appropriate update sequence.
CHOOSE CASE ii_updatestyle
CASE TOPDOWN
li_rc = of_UpdateTopDown( )
CASE BOTTOMUP
li_rc = of_UpdateBottomUp( )
CASE TOPDOWN_BOTTOMUP
li_rc = of_UpdateTopDownAndBottomUp( )
CASE BOTTOMUP_TOPDOWN
li_rc = of_UpdateBottomUpAndTopDown( )
CASE CUSTOM
li_rc = of_UpdateCustom(ii_customupdate)
CASE ELSE
li_rc = -1
END CHOOSE
// Note: One may want to confirm all other updates are succesful
// prior to clearing any flags.
IF li_rc = 1 AND ab_resetflags THEN
li_rc = of_ResetUpdate ( )
END IF
Return li_rc
end function