|
of_unregister
|
|
Full name
|
pfc_n_cst_dwcache.of_unregister
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_unregister(string)
|
Name
|
Datatype
|
la_emptyargs
|
any[20]
|
lds_empty
|
datastore
|
ldw_empty
|
datawindow
|
li_cnt
|
Integer
|
li_upper
|
Integer
|
lpo_empty
|
powerobject[]
|
ltr_empty
|
n_tr
|
public function integer of_unregister (string as_id);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_UnRegister
//
// Access: public
//
// Arguments:
// as_id
//
// Returns: integer
// 1 successful.
// -1 error.
//
// Description:
// UnRegisters the object from the service by the ID.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 6.0 Added cleanup of new variables found on the structure.
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1999 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_upper
Integer li_cnt
any la_emptyargs[20]
n_tr ltr_empty
datastore lds_empty
datawindow ldw_empty
powerobject lpo_empty[]
// Check for a valid ID.
If IsNull(as_id) or Len(Trim(as_id))= 0 Then
Return -1
End If
// Trim and Convert the ID to lower case.
as_id = Trim(Lower(as_id))
// Find the ID.
li_upper = UpperBound(inv_cachelist)
For li_cnt = 1 to li_upper
If as_id = inv_cachelist[li_cnt].s_id Then
// The entry has been found.
// Perform the actual Unregister.
If IsValid (inv_cachelist[li_cnt].ds_obj) Then
Destroy inv_cachelist[li_cnt].ds_obj
End If
inv_cachelist[li_cnt].tr_obj = ltr_empty
inv_cachelist[li_cnt].s_id = EMPTY
inv_cachelist[li_cnt].a_args = la_emptyargs
inv_cachelist[li_cnt].s_method = EMPTY
// Added cleanup of new variables found on the structure.
inv_cachelist[li_cnt].dw_originalcontrol = ldw_empty
inv_cachelist[li_cnt].ds_originalcontrol = lds_empty
inv_cachelist[li_cnt].po_originaldata = lpo_empty
inv_cachelist[li_cnt].s_originaldataobject = EMPTY
Return 1
End If
Next
// The ID was not found.
Return -1
end function
Name
|
Owner
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.lower |
systemfunctions
|
systemfunctions.trim |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|