of_iseventdefined


pfcapsrv.pbl   >   pfc_n_cst_metaclass   >   of_iseventdefined   

Full name pfc_n_cst_metaclass.of_iseventdefined
Access public
Extend of boolean
Return value boolean
Prototype public function boolean of_iseventdefined(classdefinition,string)

Name Datatype
No Data

Name Datatype
lb_found boolean
li_cnt int
li_scripts int
lscrd_object scriptdefinition

public function boolean of_iseventdefined (classdefinition acd_source, string as_eventname);//////////////////////////////////////////////////////////////////////////////
//
//	Function:
//	of_isEventDefined
//
//	Access:
//	public
//
//	Arguments:
//	acd_source		classdefinition to check if event is defined for
//	as_eventname	event name to check if it is defined for acd_source
//
//	Returns:
//	boolean
//	true = event is defined for class
//	false = event is not defined for class
//
//	Description:
//	Determines if a event is defined for a class
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

boolean	lb_found
int		li_scripts
int		li_cnt = 1
scriptdefinition	lscrd_object

// Check class definition
if not isValid (acd_source) or isNull (acd_source) then
	return lb_found
end if

// Find event definition
li_scripts = upperBound (acd_source.scriptlist)
do while li_cnt <= li_scripts and not lb_found
	if acd_source.scriptlist[li_cnt].name = as_eventname and acd_source.scriptlist[li_cnt].kind = scriptevent! then
		lb_found = true
	else
		li_cnt++
	end if
loop

return lb_found
end function

     
Name Owner
pfc_n_cst_metaclass.of_iseventdefined pfc_n_cst_metaclass

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.upperbound systemfunctions

     
Full name
No Data

     
Name Scope
No Data