Creating a WPS Object: Difference between revisions
Jump to navigation
Jump to search
Created page with " ==REXX Code Sample== This is a sample of creating a WPClock object on the Desktop. <PRE> →OS2CLOCK.CMD - Install the old OS/2 WPClock desktop object: IF RxFuncQuery('Sys..." |
No edit summary |
||
Line 1: | Line 1: | ||
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== | ==REXX Code Sample== | ||
This is a sample of creating a WPClock object on the Desktop. | This is a sample of creating a WPClock object on the Desktop. | ||
Line 13: | Line 15: | ||
==Using oo Command== | ==Using oo Command== | ||
You can also create | You can also create a clock object by using this command: | ||
oo /n WPClock | oo /n WPClock | ||
Revision as of 15:09, 26 July 2017
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.