|
of_save
|
|
Full name
|
pfc_n_cst_apppreference.of_save
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_save(string,string,boolean)
|
public function integer of_save (string as_subkey, string as_value, boolean ab_processapp);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_Save
//
// Access: public
//
// Arguments:
// as_SubKey The key value to be used on either the Registry or .Ini file.
// as_value The value to be stored on either the Registry or .Ini file.
// ab_ProcessApp True if saving value with application level preferences
// False if saving value with Application User level preferences
//
// Returns: integer
// 1 if it succeeds and -1 if an error occurs.
//
// Description: Public function to enable the developer to store other application
// type attributes in the same location as this service.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//////////////////////////////////////////////////////////////////////////////
// Save application information
if ab_processapp then
if (is_appkey <> "") then
// use the registry
Return of_Save(True, is_appkey, "", as_subkey, as_value)
elseif (is_appinifile <> "") then
Return of_Save(False, is_appinifile, is_appprefsection, as_subkey, as_value)
else
// no place to Save application level info
return -1
end if
Else
if (is_userkey <> "") then
// use the registry
Return of_Save(True, is_userkey, "", as_subkey, as_value)
elseif (is_userinifile <> "") then
Return of_Save(False, is_userinifile, is_userprefsection, as_subkey, as_value)
else
// no place to Save User level info
return -1
end if
end if
return -1
end function