Codebase list ruby-fxruby / b8f67b76-5448-4022-b0ee-b9acdb4ce639/upstream lib / fox16 / missingdep.rb
b8f67b76-5448-4022-b0ee-b9acdb4ce639/upstream

Tree @b8f67b76-5448-4022-b0ee-b9acdb4ce639/upstream (Download .tar.gz)

missingdep.rb @b8f67b76-5448-4022-b0ee-b9acdb4ce639/upstreamraw · 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