|
of_unregister
|
|
Full name
|
pfc_n_cst_tmgmultiple.of_unregister
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_unregister(powerobject)
|
Name
|
Datatype
|
li_cnt
|
integer
|
li_count
|
integer
|
li_idx
|
integer
|
li_rc
|
integer
|
li_rowcnt
|
integer
|
li_rowidx
|
integer
|
lpo_invalid
|
powerobject
|
ls_filter
|
string
|
public function integer of_unregister (powerobject apo_object);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_UnRegister
//
// Access: public
//
// Arguments:
// apo_object : powerobject ; Object to be notified
//
// Returns:
// integer
// # - Number of entries removed - could be more than one for the same object.
// 0 - Entry not found
// -1 - Error
//
// Description:
// Removes all entries for the passed object
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_count = 0
integer li_rc
integer li_rowcnt
integer li_rowidx
string ls_filter
powerobject lpo_invalid
// Validate arguments.
If isnull(apo_object) Then Return -1
If Not isvalid(apo_object) Then Return -1
// Validate required references.
If IsNull(itmg_requestor) Or Not IsValid(itmg_requestor) Then Return -1
// Determine if the object is registered.
If Not of_IsRegistered(apo_object) Then Return 0
// No interrupts while Unregistering.
itmg_requestor.stop()
// Find the object and unregister it.
li_cnt = upperbound(inv_tmgregister)
For li_idx = 1 To li_cnt
If isvalid(inv_tmgregister[li_idx].ipo_notify) Then
If inv_tmgregister[li_idx].ipo_notify = apo_object Then
// -- Found the object that needs to be unregistered. --
// Main register list - Make the object point to nothing.
inv_tmgregister[li_idx].ipo_notify = lpo_invalid
inv_tmgregister[li_idx].is_notifyevent = ''
li_count ++
// Support register list - Remove the object entry.
ls_filter = "index = "+string(li_idx)
li_rc = ids_list.SetFilter(ls_filter)
li_rc = ids_list.Filter()
li_rowcnt = ids_list.RowCount()
ids_list.RowsDiscard(1, li_rowcnt, Primary!)
li_rc = ids_list.SetFilter('')
li_rc = ids_list.Filter()
End If
End If
Next
// Calculate and Set the new interval.
of_ReCalcInterval()
// Return the number of objects unregistered.
Return li_count
end function
Name
|
Owner
|
datastore.filter |
datastore
|
datastore.rowcount |
datastore
|
datastore.rowsdiscard |
datastore
|
datastore.setfilter |
datastore
|
timing.stop |
timing
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.string |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|
pfc_n_cst_tmgmultiple.of_isregistered |
pfc_n_cst_tmgmultiple
|
pfc_n_cst_tmgmultiple.of_recalcinterval |
pfc_n_cst_tmgmultiple
|