|
of_unregisterpredefined
|
|
Full name
|
pfc_n_cst_winsrv_statusbar.of_unregisterpredefined
|
Access
|
protected
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
protected function integer of_unregisterpredefined(string)
|
Name
|
Datatype
|
li_cnt
|
Integer
|
li_rc
|
integer
|
li_upper
|
Integer
|
protected function integer of_unregisterpredefined (string as_id);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_SetUnRegisterPredefined
//
// Access: Public
//
// Arguments:
// as_id The ID of the Pre-Defined object to UnRegister.
//
// Returns: Integer
// 1 if it succeeds and -1 if an error occurs.
//
// Description:
// UnRegisters the desired Pre-Defined object.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// 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
integer li_rc
// Check arguments.
If IsNull(as_id) or Len(trim(as_id))= 0 Then
Return -1
End If
// Check for a predefined id.
If Not of_IsPredefined(Trim(as_id)) Then
Return -1
End If
// Get the number of Items currently registered.
li_upper = UpperBound (inv_dwobjects)
// Find the ID and blank the value.
For li_cnt = 1 to li_upper
If as_id = inv_dwobjects[li_cnt].s_id Then
inv_dwobjects[li_cnt].s_id = ''
inv_dwobjects[li_cnt].s_type = ''
inv_dwobjects[li_cnt].s_value = ''
inv_dwobjects[li_cnt].i_width = 0
// Notify the GUI change.
If IsValid(iw_statusbar) Then
li_rc = iw_statusbar.of_CreateVisuals()
End If
Return li_rc
End If
Next
// Id was not found.
Return -1
end function