Codebase list ruby-fxruby / upstream/1.6.42+git20200620.4fad8d6 lib / fox16 / missingdep.rb
upstream/1.6.42+git20200620.4fad8d6

Tree @upstream/1.6.42+git20200620.4fad8d6 (Download .tar.gz)

missingdep.rb @upstream/1.6.42+git20200620.4fad8d6raw · history · blame

# This is a little helper function used by some of the examples to report
# missing dependencies information on startup. It's especially useful for the
# Windows distribution since people will often start the examples by double-
# clicking on an icon instead of running from the command line.

def missingDependency(msg)
  app = Fox::FXApp.new("Dummy", "FoxTest")
  app.init(ARGV)
  mainWindow = Fox::FXMainWindow.new(app, "")
  app.create
  Fox::FXMessageBox.error(mainWindow, Fox::MBOX_OK, "Dependencies Missing", msg)
  raise SystemExit
end