Creating a WPS Object: Difference between revisions

From OS2World.Com Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Tag: Reverted
Line 3: Line 3:
|Date=2017
|Date=2017
|OS=OS/2 Warp 4.52
|OS=OS/2 Warp 4.52
|File=N/A
|File=[https://norayr.am/archive/oberon/atari_st/stjo2122/cd.textfiles.com/hobbesos29804/disk2/PATCHES/TCPIP/IC10390.ZIP IC10390.ZIP]
|Source=N/A
|Source=N/A
}}
}}

Revision as of 22:31, 19 June 2022

Article Info
Author N/A
Date 2017
OS Version OS/2 Warp 4.52
Companion File IC10390.ZIP
Source N/A

In the Workplace Shell you have classes that has been registered, and you can create objects of each class (depending the class type).

This is a quick sample on how to create a new object based on a WPS Class.

REXX Code Sample

This is a sample of creating a WPClock object on the Desktop.

/* OS2CLOCK.CMD - Install the old OS/2 WPClock desktop object */
IF RxFuncQuery('SysCreateObject') THEN CALL RxFuncAdd 'SysCreateObject','RexxUtil','SysCreateObject'
not='not '
IF SysCreateObject('WPClock','Clock','<WP_DESKTOP>') THEN not=''
CALL CharOut '','Desktop object "Clock"' not'created successfully. Press <ENTER>... '
PULL .
EXIT

Using oo Command

You can also create a clock object by using this command:

oo /n WPClock

To delete the object you can execute:

oo /d "C:\Desktop\WPClock" f

WPClock is undeletable, so the 'f' forces its deletion.