|
of_unregister
|
|
Full name
|
pfc_u_calendar.of_unregister
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_unregister(string)
|
Name
|
Datatype
|
EMPTY
|
String
|
li_cnt
|
Integer
|
li_upper
|
Integer
|
ls_rc
|
String
|
public function integer of_unregister (string as_dwcolumn);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_UnRegister
//
// Access: Public.
//
// Arguments:
// as_dwcolumn The registered column to search for.
//
// Returns: Integer
// 1 successful.
// 0 not previously registered.
// -1 error.
//
// Description:
// UnRegisters the object from the service by the column name.
//
// *Note: Function is only valid when serving a DataWindow control.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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_upper
Integer li_cnt
String ls_rc
Constant String EMPTY=''
// Check for a valid ID.
If IsNull(as_dwcolumn) or Len(Trim(as_dwcolumn))= 0 Then
Return -1
End If
// Trim and Convert to lower case.
as_dwcolumn = Trim(Lower(as_dwcolumn))
// Find the Column.
li_upper = UpperBound(is_dwcolumns)
For li_cnt = 1 to li_upper
If as_dwcolumn = is_dwcolumns[li_cnt] Then
// The entry has been found.
// Clear out any attribute changes.
If Len(is_dwcolumnsexp[li_cnt]) > 0 Then
ls_rc = idw_requestor.Modify (is_dwcolumnsexp[li_cnt])
If Len(ls_rc) > 0 Then
Return -1
End If
End If
// Perform the actual Unregister.
is_dwcolumns[li_cnt] = EMPTY
is_dwcolumnsexp[li_cnt]= EMPTY
ii_dwcolumnstyle[li_cnt]= 0
Return 1
End If
Next
// The column was not found.
Return 0
end function
Name
|
Owner
|
datawindow.modify |
datawindow
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.lower |
systemfunctions
|
systemfunctions.trim |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|