of_scancontrolarray


pfcapsrv.pbl   >   pfc_n_cst_security   >   of_scancontrolarray   

Full name pfc_n_cst_security.of_scancontrolarray
Access protected
Extend of integer
Return value integer
Prototype protected function integer of_scancontrolarray(string,windowobject[],string)

Name Datatype
No Data

Name Datatype
l_tab tab
ldw_scan datawindow
li_idx int
li_obj_cnt int
li_tab_cnt int
li_tab_idx int
ls_desc string
ls_name string
ls_object_type string
ls_tab_name string
lu_uo userobject

protected function integer of_scancontrolarray (string as_win_name, windowobject ao_objects[], string as_object_name);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_ScanControlArray
//
//	Access:  protected
//
//	Arguments : as_win_name : string ; window name
//					ao_objects[] : array of window objects; control array to scan
//					as_object_name : name of object that owns the control array. If the 
//						control array is owned by the window then this parameter is blank
//
//	Returns:  Integer
//					1 = success
//
//	Description:  Scans the passed control array. It matchs up the controls with their 
//		corresponding entries in the database and sets them accordingly
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
// 6.0 	Marked obsolete
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

int li_idx,li_obj_cnt,li_tab_cnt,li_tab_idx
string ls_name,ls_tab_name,ls_object_type,ls_desc
datawindow ldw_scan
userobject lu_uo
tab l_tab


// check for controls and datawindows
li_obj_cnt = upperbound(ao_objects)
for li_idx = 1 to li_obj_cnt
	choose case typeof(ao_objects[li_idx]) 
		case datawindow!
			ls_name = as_object_name+lower(classname(ao_objects[li_idx]))
			ls_object_type = of_GetType(ao_objects[li_idx],ls_desc)
			if not of_FindEntry(as_win_name,ls_name) then of_addobject(is_app,as_win_name,ls_name,'DataWindow',ls_desc )  

			ldw_scan = ao_objects[li_idx]
			of_ScanDatawindow(as_win_name,ldw_scan,as_object_name)
		case userobject!
			ls_name = as_object_name+lower(classname(ao_objects[li_idx]))
			ls_object_type = of_GetType(ao_objects[li_idx],ls_desc)
			if not of_FindEntry(as_win_name,ls_name) then of_addobject(is_app,as_win_name,ls_name,'UserObject',ls_desc )  

			lu_uo = ao_objects[li_idx]
			if as_object_name <> '' then 
				ls_name = as_object_name + '.'+ lower(classname(lu_uo))+ '.'
			else
				ls_name = lower(classname(lu_uo))+ '.'
			end if
			of_ScanControlArray(as_win_name,lu_uo.control,ls_name)
		case tab!
			ls_name = as_object_name+lower(classname(ao_objects[li_idx]))
			ls_object_type = of_GetType(ao_objects[li_idx],ls_desc)
			if not of_FindEntry(as_win_name,ls_name) then of_addobject(is_app,as_win_name,ls_name,'Tab',ls_desc )  
			
			ls_tab_name = ls_name
			l_tab = ao_objects[li_idx]
			li_tab_cnt = upperbound(l_tab.control)
			for li_tab_idx = 1 to li_tab_cnt
				lu_uo = l_tab.control[li_tab_idx]
				ls_name = ls_tab_name + '.'+ lower(classname(lu_uo))
				ls_object_type = of_GetType(lu_uo,ls_desc)

				if not of_FindEntry(as_win_name,ls_name) then of_addobject(is_app,as_win_name,ls_name,'TabPage',ls_desc )  
				ls_name = ls_name + '.'
				of_ScanControlArray(as_win_name,lu_uo.control,ls_name)
			next
		case mdiclient!
			// do nothing as the mdiclient is not something that we would want to set security on anyway
		case else 
			ls_name = as_object_name+lower(classname(ao_objects[li_idx]))
			if not isnull(ls_name) and len(trim(ls_name)) > 0 then 
				ls_object_type = of_GetType(ao_objects[li_idx],ls_desc)
				if not of_FindEntry(as_win_name,ls_name) then of_addobject(is_app,as_win_name,ls_name,ls_object_type,ls_desc )  
			end if
	end choose
next
return 1
end function

     
Name Owner
pfc_n_cst_security.of_scanwindow pfc_n_cst_security
pfc_n_cst_security.of_scancontrolarray pfc_n_cst_security

     
Name Owner
powerobject.typeof powerobject
systemfunctions.classname systemfunctions
systemfunctions.isnull systemfunctions
systemfunctions.len systemfunctions
systemfunctions.lower systemfunctions
systemfunctions.trim systemfunctions
systemfunctions.upperbound systemfunctions
pfc_n_cst_security.of_findentry pfc_n_cst_security
pfc_n_cst_security.of_scandatawindow pfc_n_cst_security
pfc_n_cst_security.of_scancontrolarray pfc_n_cst_security
pfc_n_cst_security.of_gettype pfc_n_cst_security
pfc_n_cst_security.of_addobject pfc_n_cst_security

     
Full name
No Data

     
Name Scope
No Data