首页 > comp > gb > object > new 
 en fr de es it nl pl pt pt_BR mk sq ca hu cs tr ar fa id vi ko ja ru zh eo
前一个  下一个  编辑  重命名  撤销  搜索  管理  
文档  
警告! 该页面未翻译。  参见英文版 
Object.New (gb)
Static Function New ( Class As String [ , Arguments As Array ] ) As Object

Instantiates the class Class.

This routine works exactly like the NEW operator, except that the class name is specified at runtime and not at compile time.

If you want to specify the observer that will receives all the events generated by the newly created object, you must use the Object.Attach static method.

Example

hButton = Object.New("Button", [hParent])
'has exactly the same effect as:
hButton = NEW Button(hParent)

As the class is specified by name, only exported classes can be instanciated.

参见

Object & Class Management, Class.New