pfc_clicked


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_linkage   >   pfc_clicked   

Full name pfc_n_cst_dwsrv_linkage.pfc_clicked
Access public
Extend of integer
Return value integer
Prototype event integer pfc_clicked(integer,integer,long,dwobject)

Name Datatype
No Data

Name Datatype
li_fnrc integer
li_i integer
li_rc integer
ll_currrow long

event pfc_clicked;call super::pfc_clicked;//////////////////////////////////////////////////////////////////////////////
//
//	Event:  			pfc_clicked
//
//	Arguments:
//	ai_xpos:  	x position clicked
//	ai_ypos:  	y position clicked
//	al_row:  	row clicked
//	adwo_obj:  	DWobject clicked
//
//	Returns:  		Integer
//	 1	Continue processing to another row
//	 0	Prevent the focus from changing to another row
//	-1 if an error occurs
//
//	Description:  
//	Determine if focus going to another row should continue or be stopped.
// If appropriate, perform an update of the current data prior to allowing focus
//	to change to a new row.
//
//	Note:
//	This is a Continue or Prevent event.
//////////////////////////////////////////////////////////////////////////////
//	
//	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_i
integer 	li_rc = 0
integer	li_fnrc
long		ll_currrow

// Make sure request is valid.
If IsNull(idw_requestor) Or Not IsValid(idw_requestor) Then Return FAILURE
If IsNull(adwo_obj) Then Return FAILURE
If IsNull(al_row) or al_row <=0 Then Return FAILURE

//If IsValid(gnv_app.inv_debug) Then 
//	gnv_app.inv_debug.of_message(idw_requestor.ClassName()+ '.Linkage.PFC_Clicked'+&
//		' al_row='+string(al_row)+ ' RowCount='+string(idw_requestor.RowCount()))
//End If

// Determine by looking at the linked dws, if current dw requires
//	Updates to occur on RowChange.
If of_UpdateOnRowChange() Then 

	// Get the current row.
	ll_currrow = idw_requestor.GetRow()

	// No action needed if the clicked is on the current row.
	If ll_currrow = al_row Then
		Return CONTINUE_ACTION
	End If
	
	// If appropriate Save the data. (if applicable, perform prompt.)
	li_rc = of_Save(ll_currrow, True)
	If li_rc = 2 Then
		// -- The user wants to loose all pending updates starting with this
		//    datawindow and down the chain. -- 
		// Loose all pending changes from this datawindow.
		li_fnrc = of_UndoModified()
		
		// For this same action, prevent the rowfocuschanging 
		//	event from prompting the user again.
		ib_allowfocuschange = True
		
	ElseIf  li_rc <= -1 or li_rc >= 3 Then
		// There was either an error or the user requested not to go to the
		// clicked row.
		Return PREVENT_ACTION
	End If
	
End If

Return CONTINUE_ACTION

end event

     
Name Owner
pfc_n_cst_dwsrv_linkage.pfc_rbuttondown pfc_n_cst_dwsrv_linkage
pfc_u_dw.clicked pfc_u_dw

     
Name Owner
datawindow.getrow datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
pfc_n_cst_dwsrv_linkage.of_save pfc_n_cst_dwsrv_linkage
pfc_n_cst_dwsrv_linkage.of_updateonrowchange pfc_n_cst_dwsrv_linkage
pfc_n_cst_dwsrv_linkage.of_undomodified pfc_n_cst_dwsrv_linkage

     
Full name
No Data

     
Name Scope
No Data