Jump to content

WpCreateAnother: Difference between revisions

From EDM2
Created page with "{{DISPLAYTITLE:wpCreateAnother}} This method is specific to version 3, or higher, of the OS/2 operating system. This instance method is called to create another object. ==Syntax== _wpCreateAnother(somSelf, pszTitle, pszSetupEnv, Folder) ==Parameters== ;''somSelf'' (WPObject *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class WPObject. ;''pszTitle'' (PSZ) - input :String containing the title of the object...."
 
(No difference)

Latest revision as of 06:09, 4 November 2025

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

This instance method is called to create another object.

Syntax

_wpCreateAnother(somSelf, pszTitle, pszSetupEnv, Folder)

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.
pszTitle (PSZ) - input
String containing the title of the object.
pszSetupEnv (PSZ) - input
Environment setup string.
This parameter is a super-string containing parameters to the new object that are extracted when the wpSetup method is called on that object.
Folder (WPFolder *) - input
Pointer to the container.

Returns

Object (WPObject *) - returns
Pointer to the new object.

How to Override

This method can be overridden only in a subclass.

Usage

This method is not covered in the provided text.

Remarks

This instance method gives a subclass the opportunity to return an object of its own choosing; for example, WPProgramFile returns an instance of WPProgram.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPObject *somSelf; /* Pointer to the object on which the method is being invoked. */
PSZ pszTitle; /* String containing the title of the object. */
PSZ pszSetupEnv; /* Environment setup string. */
WPFolder *Folder; /* Pointer to the container. */
WPObject *Object; /* Pointer to the new object. */

Object = _wpCreateAnother(somSelf, pszTitle,
                pszSetupEnv, Folder);

Related Methods