WideStudio/MWT Logo
WideStudio/MWT
Programming Guide
WideStudio/MWT Index
Table of contents


객체의 생성/ 파기를 하기에는



객체의 생성을 하기에는

객체를 새로 생성하기에는 멤버 함수 getNewInstance()를 사용합니다.

  class_name = "WSCvlabel";
  obj_name   = "vlabel001";
  #parent 새 객체를 배치할 부모 객체

  #새 객체를 취득
  obj = mwt.WSCbase.getNewInstance(class_name,parent,obj_name);
  obj.initialize();                 #생성후는 어쨌든 init 를 실행.
  obj.clear();           

  obj.setProperty("x",100);
  obj.setProperty("y",100);
  obj.setProperty("width",100);
  obj.setProperty("height",100);
  obj.setVisible(mwt.True);      # 설정이 종료했기에 표시

getNewInstance() 로 새 객체의 취득후, 다른 어느 멤버 함수보다 빨리 initialize()를 불러서, 초기화 해주십시오.

객체의 파기를 하기에는

객체를 파기하기에는, WSGFdestroyWindow 함수를 사용합니다.

  # 파기
  mwt.WSGFdestroyWindow(obj); # 파기할 객체

\$obj 에는 파기할 객체를 지정합니다.이중으로 파기하거나, 사용 중의 객체를 파기하며는, 복원 못하는 메모리 오류가 발생하기에 조심하십시오. 파기한 후에는 그 객체에는 접근(access)못하기에 포인터등으로 그 객체를 기옥하는 경우등은 접근(access)안하도록 주의 해주십시오.

Document Release 3.90 for WideStudio/MWT ver 3.90, Jul 2005


WideStudio/MWT documents index | Table of contents

Copyright(C) WideStudio/MWT Development Team, 1999-2005 Last modified: Jul 31, 2005