of_iseventimplemented


pfcapsrv.pbl   >   pfc_n_cst_metaclass   >   of_iseventimplemented   

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

Name Datatype
No Data

Name Datatype
lb_found boolean
lb_implemented boolean
li_cnt int
li_scripts int
lscrd_object scriptdefinition

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

// Check if event is scripted
if lb_found then
	lb_implemented = acd_source.scriptlist[li_cnt].isScripted
end if

return lb_implemented
end function

     
Name Owner
pfc_n_cst_metaclass.of_iseventimplemented pfc_n_cst_metaclass

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

     
Full name
No Data

     
Name Scope
No Data