Develop and Download Open Source Software

Browse CVS Repository

Contents of /exerb/exerb/example/vruby.rb

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Jul 6 01:35:22 2006 UTC (17 years, 9 months ago) by yuya
Branch: MAIN
CVS Tags: release510, release500, release400, release520, release420, ChangeLog, release461, release430, release450, release480, release470, release440, release410, release530, release490, release460, release540, HEAD
* visualurubyをvrubyに名称変更

1
2 #==============================================================================#
3 # $Id: visualuruby.rb,v 1.2 2003/12/03 19:42:34 yuya Exp $
4 #==============================================================================#
5
6 require 'vr/vruby'
7 require 'vr/vrcontrol'
8
9 #==============================================================================#
10
11 class MyForm < VRForm
12
13 def construct
14 self.caption = 'Example'
15 self.move(100, 100, 150, 160)
16 self.addControl(VRButton, 'cmd_exit', 'Exit', 20, 20, 100, 40)
17 self.addControl(VRButton, 'cmd_raise', 'Exception', 20, 70, 100, 40)
18 end
19
20 def cmd_exit_clicked
21 messageBox('exit', 'Example', 0)
22 exit
23 end
24
25 def cmd_raise_clicked
26 messageBox('raising an exception from now.', 'Example', 0)
27 raise('This is an exception.')
28 end
29
30 end
31
32 #==============================================================================#
33
34 VRLocalScreen.showForm(MyForm)
35 VRLocalScreen.messageloop
36
37 #==============================================================================#
38 #==============================================================================#

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26