|
of_triggerevent
|
|
Full name
|
pfc_n_cst_dwsrv_linkage.of_triggerevent
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_triggerevent(string)
|
Name
|
Datatype
|
li_i
|
Integer
|
li_numdetails
|
Integer
|
li_rc
|
Integer
|
li_rcall
|
Integer
|
public function integer of_triggerevent (string as_event);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_TriggerEvent
//
// Access: Public
//
// Arguments:
// as_event: The name of the event to be triggered
//
// Returns: Integer
// 1 Succeeds for *ALL* linked datawindows.
// -1 Event call on all linked datawnindows, but it did not exist
// or has no script for at least one datawindow.
// -2 Fatal error encountered.
//
// Description: Walks the linked datawindow chain and triggers the passed
// event in the datawindow control.
//
// *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
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_numdetails
Integer li_rc=1, li_rcall=1
Integer li_i
// Verify passed arguments.
If IsNull(as_event) or Len(Trim(as_event))=0 Then Return -2
// Trigger the event on the requesting datawindow; save error if any.
li_rc = idw_requestor.TriggerEvent (as_event)
If li_rc < li_rcall Then li_rcall = li_rc
// Determine how many details are subordinate to the requestor.
li_numdetails = UpperBound ( idw_details )
// Loop through the valid details and call this function on the each detail.
For li_i = 1 to li_numdetails
If IsValid(idw_details[li_i]) Then
If IsNull(idw_details[li_i].inv_Linkage) Or &
Not IsValid(idw_details[li_i].inv_Linkage) Then Return -2
// Trigger the event on details, save error if any.
li_rc = idw_details[li_i].inv_Linkage.of_TriggerEvent (as_event)
If li_rc < li_rcall Then li_rcall = li_rc
End If
Next
Return li_rcall
end function
Name
|
Owner
|
powerobject.triggerevent |
powerobject
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.trim |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|
pfc_n_cst_dwsrv_linkage.of_triggerevent |
pfc_n_cst_dwsrv_linkage
|