of_getdatasource


pfcapsrv.pbl   >   pfc_n_cst_tvsrv_levelsource   >   of_getdatasource   

Full name pfc_n_cst_tvsrv_levelsource.of_getdatasource
Access public
Extend of integer
Return value integer
Prototype public function integer of_getdatasource(integer,ref n_ds)

Name Datatype
No Data

Name Datatype
li_Limit Integer
ltvi_Item TreeViewItem

public function integer of_getdatasource (integer ai_level, ref n_ds ads_obj);//////////////////////////////////////////////////////////////////////////////
//
//	Function:	of_GetDataSource
//
//	Access:		public
//
//	Arguments:
//	ai_Level		The level of the TreeView for which you want the DataStore.
//	ads_obj		The handle to the DataStore (of type n_ds) for the level.
//						Passed by reference.
//
//	Returns:		Integer
//					 1	- the DataStore was found
//					-1	- the DataStore was not found
//
//	Description:	Return the DataStore a particular level in the TreeView points
//						to.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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_Limit
TreeViewItem		ltvi_Item

// check arguments
If IsNull(ai_level) or (ai_level < 1) Then Return -1

li_Limit = UpperBound(inv_attrib)
If ai_Level > li_Limit Then
	// Allow for recursion
	If Not inv_attrib[li_Limit].ib_Recursive Then Return -1
	
	ai_Level = li_Limit
End If

ads_obj = inv_attrib[ai_Level].ids_obj

Return 1

end function

     
Name Owner
pfc_n_cst_tvsrv_levelsource.pfc_refreshlevel pfc_n_cst_tvsrv_levelsource

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.upperbound systemfunctions

     
Full name
No Data

     
Name Scope
No Data