of_deleteitem


pfcdwsrv.pbl   >   pfc_n_cst_dwsrv_dropdownsearch   >   of_deleteitem   

Full name pfc_n_cst_dwsrv_dropdownsearch.of_deleteitem
Access protected
Extend of integer
Return value integer
Prototype protected function integer of_deleteitem(integer)

Name Datatype
No Data

Name Datatype
li_count integer
li_i integer
lnv_columns n_cst_dwsrv_dropdownsearchattrib[]

protected function integer of_deleteitem (integer ai_index);//////////////////////////////////////////////////////////////////////////////
//
//	Function:		of_DeleteItem
//
//	Access:			protected
//
//	Arguments:
//	ai_index			index number 
//
//	Returns:  		Integer
//						1 if it succeeds and -1 if an error occurs.
//
//	Description: 	This function is called to remove a entry from the array.
//
//		*Note: 	Function will also repack the array.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
//	7.0   Local variable datatype changed from os_columns to n_cst_dwsrv_dropdownsearchattrib type
//	7.0   Local variable name changed from lstr_columns to lnv_columns
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1999 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, li_count
n_cst_dwsrv_dropdownsearchattrib	lnv_columns[]

// Get the size of the array.
li_count = upperbound(inv_columns)

// Validate the argument.
If IsNull(ai_index) or ai_index <=0 or ai_index > li_count Then Return -1

// Copy from the begining to the entry prior the passed value.
If ai_index >= 2 Then
	For li_i=1 To ai_index -1
		lnv_columns[li_i] = inv_columns[li_i]	
	Next
End If	

// Also copy the rest of the array skipping the passed entry value.
If li_count > ai_index Then
	For li_i = ai_index +1 To li_count
		lnv_columns[li_i -1] = inv_columns[li_i]
	Next	
End If

// Store the new array on the instance variable.
inv_columns = lnv_columns
Return 1
end function

     
Name Owner
pfc_n_cst_dwsrv_dropdownsearch.of_unregister pfc_n_cst_dwsrv_dropdownsearch

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.upperbound systemfunctions

     
Full name
No Data

     
Name Scope
No Data