| WideStudio Programming Guide | WideStudio Index Table of contents

> ## How to create/delete the instances

> ### How to create the instance

> You can create the instance with the method: WSCbase::getNewInstance().

>       $class_name = "WSCvlabel";
>       $obj_name   = "vlabel001";
>       # The parent instance which has new instance.

>       # create a new instance.
>       $obj = mpfc::WSCbase_getNewInstance($class_name,$parent,$obj_name);
>       $obj->init();       #initialize the instance.
>       $obj->clear();

>       $obj->setProperty("x",100);
>       $obj->setProperty("y",100);
>       $obj->setProperty("width",100);
>       $obj->setProperty("height",100);
>       $obj->setVisible($mpfc::True);

> You have to call mpfc::WSCbase_init() to initialize before calling the other methods of the created instance.

> ### How to delete the instance

> You can destroy the instance with the global function: WSGFdestroyWindow().

>       # destroy the instance.
>       mpfc::WSGFdestroyWindow($obj);

> Do not call WSGFdestroyWindow() with same instance twice, and do not access the destroyed instance,because it causes a fatal memory error.

Document Release 3.70 for WideStudio ver 3.70, May 2004

WideStudio documents index | Table of contents

Copyright(C) WideStudio Development Team, 1999-2004 | Last modified: May 25, 2004