|
of_gethandle
|
|
Full name
|
pfc_n_cst_tvsrv_levelsource.of_gethandle
|
Access
|
public
|
Extend of
|
long
|
Return value
|
long
|
Prototype
|
public function long of_gethandle(ref n_ds,long,integer)
|
Name
|
Datatype
|
ll_rowid
|
Long
|
ls_Key
|
String
|
public function long of_gethandle (ref n_ds ads_obj, long al_row, integer ai_level);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_GetHandle
//
// Access: public
//
// Arguments:
// ads_obj The handle to the DataStore (of type n_ds) for the item's
// level. Passed by reference.
// al_Row The row in the DataStore that the item points to.
// ai_Level The level to search, if 0 entire tree will be searched.
//
// Returns: Long
// The handle of the TreeView item that points to that row, 0 if the item
// was not found, or -1 if an error occurrs
//
// Description: Return the TreeView handle that points to a particular row in a DataStore.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
Long ll_rowid
String ls_Key
// Check Arguments
If IsNull(ads_obj) or Not IsValid(ads_obj) then Return -1
If IsNull(al_Row) or (al_row < 1) Then Return -1
If IsNull(ai_level) or (ai_level < 0) Then Return -1
If ai_level > UpperBound(inv_attrib) then Return -1
// Get the generated key for the row
ls_key = of_encodekey(ads_obj, al_Row)
If ls_key = "!" then return -1
// Find the item
Return of_FindItem("data", ls_Key, 0, ai_level, False, True)
end function