CreateObject()

Summary

Creates a new object variable based on a class.

Changes

Added to Version 5.0.

Syntax

object_variable = CreateObject(string class_name [, arg1 [, arg2 [,... [, arg8]]]])

Argument Contents
class_name The name of the class from which the object is created
arg1, arg2, etc. Optional arguments to the Init macro

Returns

A new object variable.

Notes

  • If the class Init macro returns with a Return() statement, rather than running to completion, the object is not created and CreateObject() returns null.

Error Codes

Error Type Meaning
NotFound There is no class with that name

See Also

Function Summary
GetClassMethodNames() Returns a list of the names of the methods defined for the class
GetObjectClass() Gets the name of the class for an object
GetObjectVariableNames() Gets a list of the variable names for an object
IsKindOfClass() Determines whether an object is in a class or inherits from that class
ObjectHasMethod() Determines whether an object's class, or an inherited class, implements a method