From: Masao M. <mu...@hi...> - 2002-07-11 14:26:15
|
Hi, On Thu, 11 Jul 2002 14:15:02 +0200 Matthias Veit <mat...@ya...> wrote: > >>>> MM == Masao Mutoh <mu...@hi...> wrote: > I have the problem, because I use the gnome bindings. > Gnome intercepts the argument processing: > > test.rb > --------------------------------------- > require 'gnome' > Gtk::Window.new.set_title(ARGV[0]).show > Gtk.main > --------------------------------------- > $ruby test.rb --help > > Certainly there is the possibility to add own arguments > I don't know - do you? Hmm.... This is very difficult problem... I think it is better to implement Gnome#init which can accept arguments. So the code is like as follows: ----------- require 'gnome' options = [ ['foo','f',Gnome::POPT_ARG_NONE, .... ] ['bar','b',Gnome::POPT_ARG_STRING, .... ]] args = Gnome.init("ApplicationName", "1.0", options) Gtk::Window.new.set_title(args['bar']).show ... Gtk.main ----------- But this is big change for Ruby/GNOME. I think I should implement like this in Ruby/GNOME2. But ... Should I implement this for Ruby/GNOME ? -- .:% Masao Mutoh<mu...@hi...> |