|
of_modify
|
|
Full name
|
pfc_n_cst_winsrv_statusbar.of_modify
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_modify(string,string)
|
Name
|
Datatype
|
li_cnt
|
Integer
|
li_rc
|
integer
|
li_upper
|
Integer
|
public function integer of_modify (string as_id, string as_value);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_Modify
//
// Access: Public
//
// Arguments:
// as_id The ID of the object to be modified.
// as_value The value to be used on the modification of the object.
//
// Returns: integer
// 1 if it succeeds and -1 if an error occurs.
//
// Description:
// Modifies the value of the User Defined object.
// The object can either be a text value or a bitmap name.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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 =1
// Check arguments.
If IsNull(as_id) or Len(trim(as_id))= 0 or IsNull(as_value) Then
Return -1
End If
// Check for a predefined id.
If of_IsPredefined(Trim(as_id)) Then
// This is not a valid operation on a pre-defined ID.
Return -1
End If
// Get the number of Items currently registered.
li_upper = UpperBound (inv_dwobjects)
// Find the ID and Update it.
For li_cnt = 1 to li_upper
If as_id = inv_dwobjects[li_cnt].s_id Then
// Modify the value.
inv_dwobjects[li_cnt].s_value = as_value
// Notify the GUI of a new value.
If IsValid(iw_statusbar) Then
li_rc = iw_statusbar.of_UpdateVisuals( &
inv_dwobjects[li_cnt].s_id, inv_dwobjects[li_cnt].s_type, &
inv_dwobjects[li_cnt].s_value)
End If
Return li_rc
End If
Next
// The ID has not been registered.
Return -1
end function