|iClassId||The Class Id of the object to be created.|
The object handle of the newly created object.
Function CreateNamed Integer iClassId String sName Returns Handle
|Call:||Get CreateNamed iClassId sName to HandleVariable|
Creates an object based on the passed Class Id and assigns it a name Name based on a passed name.
Get CreateNamed (RefClass(cImageList32)) "oImageList" to hoImage
CreateNamed behaves exactly the same as Create, except it allows you to give you dynamic object a name. Create always sets the new created object name to "oObject". CreateNamed lets you set a more meaningful name.
You never send messages to dynamic objects via their name, which is why it does not matter internally what the name of the object is. However, using CreateNamed creates objects that are much easier to debug. If you've ever tried to figure out exactly what the "oObject" the debugger is referring to, the reason for the purpose of this function should be obvious.
Note that this is equivalent to:
Get Create (RefClass(cImageList32)) to hoImage Set Name of hoImage to "oImageList"