WpCopyObject: Difference between revisions
Appearance
No edit summary |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:wpCopyObject}} | {{DISPLAYTITLE:wpCopyObject}} | ||
This instance method is called to create a new copy of the object. | This instance method is called to create a new copy of the object. | ||
; Original Class : [[WPObject]] | ; Original Class : [[WPObject]] | ||
==Syntax== | ==Syntax== | ||
rc = _wpCopyObject(somSelf, Folder, fLock); | |||
rc = _wpCopyObject(somSelf, Folder, fLock); | |||
==Parameters== | ==Parameters== | ||
; somSelf (WPObject *) - input | ; somSelf (WPObject *) - input: 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. | ||
; Folder (WPFolder *) - input: Pointer to a Folder object. | |||
; Folder (WPFolder *) - input : Pointer to a Folder object. | ::A pointer to a Folder object in which to place this new object. This pointer can be determined by issuing a call to the wpclsQueryFolder method. | ||
::A pointer to a Folder object in which to place this new object. This pointer can be determined by issuing a call to the wpclsQueryFolder method. | ; fLock (BOOL) - input:Lock object flag. | ||
If this flag is false, the newly created object will be made dormant whenever the object and the folder containing the object are closed. | |||
; fLock (BOOL) - input | If this flag is true, the new object will remain active until the caller issues the wpUnlockObject method on it. | ||
If this flag is false, the newly created object will be made dormant whenever the object and the folder containing the object are closed. | |||
If this flag is true, the new object will remain active until the caller issues the wpUnlockObject method on it. | |||
==Return Code== | ==Return Code== | ||
; rc (WPObject *) - returns | ; rc (WPObject *) - returns:Pointer to the newly created object. | ||
A return value of NULL indicates that an error occurred. | A return value of NULL indicates that an error occurred. | ||
==Remarks== | ==Remarks== | ||
Copies of an object can always be deleted and moved by default, even if the original has the OBJSTYLE_NODELETE or | Copies of an object can always be deleted and moved by default, even if the original has the OBJSTYLE_NODELETE or OBJSTYLE_NOMOVE style set. | ||
OBJSTYLE_NOMOVE style set. | |||
==Override== | ==Override== | ||
This method can be overridden by classes which need to keep track of where instances are generated. | This method can be overridden by classes which need to keep track of where instances are generated. | ||
==C Include== | |||
#define INCL_WINWORKPLACE | |||
#include <os2.h> | |||
[[Category:SOMClass]] | [[Category:SOMClass]] |
Latest revision as of 09:37, 26 March 2018
This instance method is called to create a new copy of the object.
- Original Class
- WPObject
Syntax
rc = _wpCopyObject(somSelf, Folder, fLock);
Parameters
- somSelf (WPObject *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPObject.
- Folder (WPFolder *) - input
- Pointer to a Folder object.
- A pointer to a Folder object in which to place this new object. This pointer can be determined by issuing a call to the wpclsQueryFolder method.
- fLock (BOOL) - input
- Lock object flag.
If this flag is false, the newly created object will be made dormant whenever the object and the folder containing the object are closed. If this flag is true, the new object will remain active until the caller issues the wpUnlockObject method on it.
Return Code
- rc (WPObject *) - returns
- Pointer to the newly created object.
A return value of NULL indicates that an error occurred.
Remarks
Copies of an object can always be deleted and moved by default, even if the original has the OBJSTYLE_NODELETE or OBJSTYLE_NOMOVE style set.
Override
This method can be overridden by classes which need to keep track of where instances are generated.
C Include
#define INCL_WINWORKPLACE #include <os2.h>