| WideStudio Index |
Table of contents
How to create/delete the instances
How to create the instanceYou can create the instance with the method: WSCbase::getNewInstance().let cname = "WSCvlabel" in let iname = "vlabel001" in (* parent: The parent instance which has new instance. *) (* create a new instance. *) let obj = _WSCbase_getNewInstance '( (make_string cname), (parent),(make_string iname) ) in ignore(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 (_True);You have to call initialize() to initialize before calling the other methods of the created instance.
How to delete the instanceYou can destroy the instance with the global function: WSGFdestroyWindow().(* destroy the instance. *) _WSGFdestroyWindow '(obj);Do not call WSGFdestroyWindow() with the same instance twice, and do not access the destroyed instance, because it causes a fatal memory error.
|Copyright(C) WideStudio Development Team, 1999-2005||Last modified: Jan 05, 2005|