Sha256: b485075acff13540276a7467bfdc8a2e106d03f4e76a9af2a736c820114198e0
Contents?: true
Size: 860 Bytes
Versions: 1
Compression:
Stored size: 860 Bytes
Contents
#!/usr/bin/env ruby # wxRuby2 Sample Code. Copyright (c) 2004-2006 Kevin B. Smith # Freely reusable code: see SAMPLES-LICENSE.TXT for details begin require 'wx' rescue LoadError => no_wx_err begin require 'rubygems' require 'wx' rescue LoadError raise no_wx_err end end class MyFrame < Wx::Frame def initialize(title) super(nil, -1, title) end end class NothingApp < Wx::App def on_init puts("in on_init") $frame = MyFrame.new("Minimal wxRuby App") puts("about to call show") $frame.show puts("returning from on_init") return true end def on_fatal_exception puts("on_fatal_exception") end def on_exit puts("on_exit") return super end end a = NothingApp.new a.main_loop() puts("back from main_loop...") GC.start puts("survived gc")
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wxruby-1.9.1-i386-mswin32 | samples/minimal/nothing.rb |