Programmer Guide/Shell Items/Instance/NEW INSTANCE: Difference between revisions
From STX Wiki
< Programmer Guide | Shell Items | Instance
Jump to navigationJump to search
mNo 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 | 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. | ||
;<var>name</var> | ;<var>name</var> |
Revision as of 07:25, 25 October 2017
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.