Programmer Guide/Shell Items/Instance/NEW INSTANCE: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
Line 4: Line 4:
<code>NEW INSTANCE <var>name</var> <var>classname</var> [/Auto <var>arguments</var>] [ /G ]</code>
<code>NEW INSTANCE <var>name</var> <var>classname</var> [/Auto <var>arguments</var>] [ /G ]</code>


Create an instance item of the loaded class <var>classname</var>. Only the instance environment is created and connected to the class (members), no constructor is called. Use the base class function COBJ NEW class [args] instead, if your class uses standard construction/destruction methods.
Create an instance item of the loaded class <var>classname</var>. Only the instance environment is created and connected to the class (members), no constructor is called. Use the base class function <code>[[Programmer_Guide/Macro_Library/COBJ#New|COBJ NEW class [args]]]</code> instead, if your class uses standard construction/destruction methods.


;<var>name</var>
;<var>name</var>

Latest revision as of 08:12, 7 August 2019

Instance Item
NEW SET ATTRIBUTES

NEW INSTANCE name classname [/Auto arguments] [ /G ]

Create an instance item of the loaded class classname. Only the instance environment is created and connected to the class (members), no constructor is called. Use the base class function COBJ NEW class [args] instead, if your class uses standard construction/destruction methods.

name
The name to give the instance.
classname
The type of class to instantiate.
arguments
A list of arguments to pass to the constructor. Only applicable if the option /Auto is used.
/Auto
Use the /A option to pass a list of arguments to the class' constructor.
/G
Garbage collection. If specified, the item is automatically deleted when exiting the macro.

Navigation menu

Personal tools