From: Matthias V. <mat...@ya...> - 2002-07-11 12:18:32
|
>>>> MM == Masao Mutoh <mu...@hi...> wrote: MM> If you want to pass arguments from the command when you MM> execute the application, you can use ARGV. MM> MM> test.rb MM> ------------------ MM> require 'gtk' MM> Gtk::Window.new.set_title(ARGV[0]).show MM> Gtk.main MM> ------------------ MM> MM> $ruby test.rb "Ruby/GTK" MM> MM> or parsearg.rb, getoptlong.rb is more useful. MM> MM> Cheers, MM> Masao. Hi Masao, thank you for the fast answer. My problem description was not very exactly: 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? Best Regards, Matthias _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |