WideStudio Logo
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);
  mpfc::WSCbase_initialize($obj);       #initialize the instance.
  mpfc::WSCbase_clear($obj);           

  mpfc::WSCbase_setProperty($obj,"x",100);
  mpfc::WSCbase_setProperty($obj,"y",100);
  mpfc::WSCbase_setProperty($obj,"width",100);
  mpfc::WSCbase_setProperty($obj,"height",100);
  mpfc::WSCbase_setVisible($obj,$mpfc::True);

You have to call mpfc::WSCbase_initialize() 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, Feb 2004


WideStudio documents index | Table of contents

Copyright(C) T. Hirabayashi, 2000-2004 Last modified: Feb 25, 2004