Project VisualuRuby(tmp-name)

SourceForge Logo

[Japanese Page]

short comment(2009/02/08)

vrswin090207 is the snapshot tarball for ruby-1.9.1

Known problems

Cause SEGV when using ActiveX with Ruby's thread.

Deadlocks happen by calling SendMessage() or functions that call it internally from non-owner thread of the window. (ruby-1.9)

INDEX

In this page another page screenshots(I'll create another page about them)
@ About VisualuRuby(tmp-name)

"VisualuRuby" is a GUI library on MS Windows for Ruby.
The project has two part, one is "swin" which is about ruby extension library, the other is "vruby" : a set of vr* series of ruby scripts which wrap swin.
The event handling style is like that of VisualBasic.

Most Frequently Answered Questions

Q: Can I have more English documentations?
A: Now I'm working for it.

Q: Can I get some help at ruby scripting on VisualStudio?
A: No. This project has nothing to do with VisualStudio.

Q: You mis-spelling the project name, don't you?
A: No. This project name is 'VisualuRuby'

@ Requirements
Win32 environment
FYI, my environment is on Win98.
Ruby interpreter
There are some ruby interpreters, mswin32/mingw32/cygwin/...
I'm using its cygwin version.
swin
This is a DLL for this project and by this project.
This is included by some binary distributions of ruby interpreters on Windows.
You can make this DLL with a C compiler.

You don't need another additional DLL.
SIMPLE!!

@ Features

with swin

with vruby

@ Simplest Sample Scripts

These two scripts provides a same window to capture WM_COMMAND message sent by a Button.

swin


  require 'swin'
  
  WM_COMMAND        = 0x00000111
  WS_VISIBLECHILD   = 0x50000000
  BS_PUSHBUTTON     = 0x00000000
  
  RFactory=SWin::LWFactory.new(SWin::Application.hInstance)
  
  mw=RFactory.newwindow(nil)
  mw.caption="Window Caption"
  mw.move(300,200,400,400)
  mw.create
  
  bn=RFactory.newwindow(mw)
  bn.classname="BUTTON"
  bn.caption="Button1"
  bn.etc=1234            #control id
  bn.style=WS_VISIBLECHILD | BS_PUSHBUTTON
  bn.move 80,50,80,40
  bn.create
  
  mw.addEvent WM_COMMAND
  
  def mw.msghandler(msg)  #msg has attrs of hWnd,msg,wParam,lParam
    if msg.msg==WM_COMMAND then
      messageBox "Button Pushed"
    end
  end
  
  mw.show
  SWin::Application.messageloop

vruby


  require 'vr/vruby'
  require 'vr/vrcontrol'

  class MyForm < VRForm
    def construct
      self.caption="Window Caption"
      self.move(300,200,400,400)
      addControl(VRButton,"btn1","Button1",80,50,80,40)
    end

    def btn1_clicked
      messageBox "Button Pushed"
    end
  end

  VRLocalScreen.showForm(MyForm)
  VRLocalScreen.messageloop


@ Downloads

You can get the products from Ruby Application Archives, but the latest version may be not available there.

And I'm sorry that I'm afraid I'll miss to update this English page. The real latest version is available at download page in Japanese .

The archives are in two style: lzh and zip

dw source files of "swin" and five test scripts in lzh. or dw(zip)
(62kB) 09/02/07 version (yyyy/mm/dd).
dw scripts of vruby and test scripts in lzh. or dw(zip)
(98kB) 08/02/29
dw set of sample scripts. (zip) (30kB) 08/02/29
English sample description is available.
Some scripts file include SJIS-coded Japanese Text. Use -Ks option for ruby.

Yukimi-sake is developing GUI builder "FormDesigner" for this project. (Screen capture:Screen capture 2)
He is also distributing compiled html help(chm) about this project.

The vruby's reference is included in the script in RD format as comments.

@ My Japanese Pages about VisualuRuby(tmp-name)

@ Notes

Email: nyasu@osk.3web.ne.jp