of_register


pfcapsrv.pbl   >   pfc_n_cst_tmgsingle   >   of_register   

Full name pfc_n_cst_tmgsingle.of_register
Access public
Extend of integer
Return value integer
Prototype public function integer of_register(powerobject,string,real)

Name Datatype
No Data

Name Datatype
idtm_nexttime datetime
it_now time
li_cnt integer
li_firstopening integer
li_idx integer
li_rc integer
ll_row long
ls_filter string

public function integer of_register (powerobject apo_object, string as_eventname, real ar_interval);//////////////////////////////////////////////////////////////////////////////
//
//	Function: of_Register
//
//	Access: public
//
//	Arguments:
//	apo_object : powerobject ; Object to be notified
//	as_eventname : string; Event to be notified
//	ar_interval : long ; How often to notify (in seconds)
//
//	Returns: integer
//	1 - Success
//	-1 - Errror
//
//	Description:
//	Registers the passed object/event pair. 
//
// Note:
//	There can only be one object registered.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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_cnt
integer	li_idx
integer	li_firstopening
integer	li_rc
long 		ll_row
string 	ls_filter
time 		it_now
datetime idtm_nexttime

// Validate the arguments
If isnull(apo_object) Then Return -1
If Not isvalid(apo_object) Then Return -1
If len(trim(as_eventname)) = 0 Then Return -1

// Validate required references.
If IsNull(itmg_requestor) Or Not IsValid(itmg_requestor) Then Return -1

// No interrupts while processing
itmg_requestor.Stop()

// Check for the valid minimum and maximum intervals.
If ar_interval < .055 Then ar_interval = .055
If ar_interval > 65 Then ar_interval = 65

// Keep track of the new object/event to notify.
ipo_notifyobject = apo_object
is_notifyevent = Trim(Lower(as_eventname))
ir_interval = ar_interval

// Start the interrupts.
itmg_requestor.Start(ir_interval)

Return 1
end function

     
Name Owner
No Data

     
Name Owner
timing.start timing
timing.stop timing
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.len systemfunctions
systemfunctions.lower systemfunctions
systemfunctions.trim systemfunctions

     
Full name
No Data

     
Name Scope
No Data