|
of_unregister
|
|
Full name
|
pfc_n_cst_dwsrv_resize.of_unregister
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_unregister(string)
|
Name
|
Datatype
|
li_cnt
|
integer
|
li_registered_slot
|
integer
|
li_upperbound
|
integer
|
public function integer of_unregister (string as_control);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_UnRegister
//
// Access: public
//
// Arguments:
// as_control The control to unregister.
//
// Returns: integer
// 1 if it succeeds and -1 if an error occurs.
//
// Description: Unregister a control that was previously registered.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.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_upperbound
integer li_cnt
integer li_registered_slot
// Validate the reference.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
Return -1
End If
//Check parameters
If IsNull(as_control) or Len(Trim(as_control))=0 Then
Return -1
End If
//Confirm that the user object has already been initialized
If il_parentprevheight=-1 And il_parentprevwidth=-1 Then
Return -1
End If
//Get the current UpperBound
li_upperbound = UpperBound (inv_registered[])
//Find the registered object
li_registered_slot = 0
For li_cnt = 1 to li_upperbound
If inv_registered[li_cnt].s_control = as_control Then
li_registered_slot = li_cnt
exit
End If
Next
//If the control was not previously registered, return
//an error code.
If li_registered_slot = 0 Then
Return -1
End If
//Unregister the control
inv_registered[li_registered_slot].s_control = EMPTY
inv_registered[li_registered_slot].s_typeof = ''
inv_registered[li_registered_slot].b_movex = False
inv_registered[li_registered_slot].i_movex = 0
inv_registered[li_registered_slot].b_movey = False
inv_registered[li_registered_slot].i_movey = 0
inv_registered[li_registered_slot].b_scalewidth = False
inv_registered[li_registered_slot].i_scalewidth = 0
inv_registered[li_registered_slot].b_scaleheight = False
inv_registered[li_registered_slot].i_scaleheight = 0
Return 1
end function
Name
|
Owner
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.trim |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|