WpCopiedFromTemplate: Difference between revisions
Appearance
Created page with "{{DISPLAYTITLE:wpCopiedFromTemplate}} This instance method is called to allow an object to perform class-specific processing when a new object is created from a template. ==Syntax== _wpCopiedFromTemplate(somSelf) ==Parameters== ;''somSelf'' (WPObject *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class WPObject. ==Returns== :There is no return value for this method. ==How to Override== This method should be ov..." |
(No difference)
|
Latest revision as of 06:07, 4 November 2025
This instance method is called to allow an object to perform class-specific processing when a new object is created from a template.
Syntax
_wpCopiedFromTemplate(somSelf)
Parameters
- somSelf (WPObject *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPObject.
Returns
- There is no return value for this method.
How to Override
This method should be overridden by object classes that need to initialize the new object after it is created from a template.
Usage
This method is generally called only by the system.
Example Code
#define INCL_WINWORKPLACE #include <os2.h> WPObject *somSelf; /* Pointer to the object on which the method is being invoked. */ _wpCopiedFromTemplate(somSelf);
Remarks
This method is called immediately after a new object is created from a template. The system does not do any default processing for this method. This method is typically overridden to perform class-specific initialization on a created object. For example, a customer order-form class would prefill the date, time, and order number in an instance of itself that was created from a template.