|
of_findstartandendrows
|
|
Full name
|
pfc_n_cst_dwsrv_find.of_findstartandendrows
|
Access
|
protected
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
protected function integer of_findstartandendrows(ref long,ref long)
|
protected function integer of_findstartandendrows (ref long al_startrow, ref long al_endrow);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_FindStartAndEndRows
//
// Access: protected
//
// Arguments:
// al_startrow The row the find should start looking in. (by Reference)
// al_endrow The row the find will stop looking in. (by Reference)
//
// Returns: Integer
// 1 if it succeeds and -1 if an error occurs.
// 0 if the point of no more searches has been reached.
//
// Description: Determine what the Starting row and the Ending row should
// be for the Find statement.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
//Validate the direction attribute.
If Lower(inv_findattrib.is_direction) <> "up" And &
Lower(inv_findattrib.is_direction) <> "down" Then
inv_findattrib.is_direction = "Down"
End If
//Check required.
If IsNull(idw_requestor) Or Not IsValid(idw_requestor) Then
Return -1
end If
//Get the current row.
al_startrow = idw_requestor.GetRow()
//Determine the start and end rows for the find.
CHOOSE CASE Lower(inv_findattrib.is_direction)
CASE "up"
al_endrow = 1
If ib_ongoingfind Then
//For ongoing finds do not search on the current row.
If al_startrow - 1 >= al_endrow Then
al_startrow --
Else
Return 0
End If
End If
CASE Else
// "down"
al_endrow = idw_requestor.RowCount()
If ib_ongoingfind Then
//For ongoing finds do not search on the current row.
If al_startrow + 1 <= al_endrow Then
al_startrow ++
Else
Return 0
End If
End If
END CHOOSE
Return 1
end function
Name
|
Owner
|
datawindow.getrow |
datawindow
|
datawindow.rowcount |
datawindow
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.lower |
systemfunctions
|