Jump to content

WpReplaceObject: Difference between revisions

From EDM2
Created page with "{{DISPLAYTITLE:wpReplaceObject}} This method is specific to Version 4, or higher, of the OS/2 operating system. This instance method replaces an object in another folder. ==Syntax== _wpReplaceObject(somSelf, targetObject, fMove); ==Parameters== ;''somSelf'' (WPObject *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class WPObject. ;''targetObject'' (WPObject *) - input :Object to replace. ;''fMove'' (BOOL3..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 8: Line 8:


==Parameters==
==Parameters==
;''somSelf'' ([[WPObject]] *) - input
;''somSelf'' ([[WPObject]] *) - input:Pointer to the object on which the method is being invoked.
:Pointer to the object on which the method is being invoked.
:Points to an object of class [[WPObject]].
:Points to an object of class [[WPObject]].
 
;''targetObject'' ([[WPObject]] *) - input:Object to replace.
;''targetObject'' ([[WPObject]] *) - input
;''fMove'' ([[BOOL32]]) - input:Type of move flag.
:Object to replace.
 
;''fMove'' ([[BOOL32]]) - input
:Type of move flag.
::TRUE: Move and replace object.
::TRUE: Move and replace object.
::FALSE: Copy and replace object.
::FALSE: Copy and replace object.


==Returns==
==Returns==
;''rc'' ([[BOOL32]]) - returns
;''rc'' ([[BOOL32]]) - returns:Success indicator.
:Success indicator.
::TRUE: Successful completion.
::TRUE: Successful completion.
::FALSE: Error occurred.
::FALSE: Error occurred.

Latest revision as of 20:37, 24 September 2025

This method is specific to Version 4, or higher, of the OS/2 operating system.

This instance method replaces an object in another folder.

Syntax

_wpReplaceObject(somSelf, targetObject, fMove);

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.
targetObject (WPObject *) - input
Object to replace.
fMove (BOOL32) - input
Type of move flag.
TRUE: Move and replace object.
FALSE: Copy and replace object.

Returns

rc (BOOL32) - returns
Success indicator.
TRUE: Successful completion.
FALSE: Error occurred.

Remarks

The wpReplaceObject method deletes the target object, copies the current object to the folder that contained the target object, then optionally deletes the current object (if the fMove parameter is set to TRUE).

Usage

This method can be called at any time to replace one object with a copy of the current object.

How to Override

This method is not generally overridden.

Example Code

In this example, we replace the target object with a copy of the source object.

_wpReplaceObject(SourceObject,TargetObject,FALSE);

Related Methods