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


例1 (Hello World)

首先,创建项目,接着创建应用程序窗口和事件过程。 在如下所示的基本例子中,窗口中的按钮被按下后, 会显示“hello”字符串。

源代码如下所示: ws/samples/Ruby/hello/newproject.prj 使用应用程序生成器打开文件,并进行编译。



[应用程序窗口示例]

#----------------------------------------------------------
#Function for the event procedure
#----------------------------------------------------------
def btn_proc(object)
  object.setProperty("labelString","hello")
end



[应用程序运行示例]