<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>------------------------------<br><br>Message: 3<br>Date: Tue, 14 Mar 2006 11:17:12 +0100
<br>From: Kevin Krammer <<a href="mailto:kevin.krammer@gmx.at">kevin.krammer@gmx.at</a>><br>Subject: Re: [kde-linux] KDE and Ruby<br>To: <a href="mailto:kde-linux@kde.org">kde-linux@kde.org</a><br>Message-ID: <<a href="mailto:200603141117.19629.kevin.krammer@gmx.at">
200603141117.19629.kevin.krammer@gmx.at</a>><br>Content-Type: text/plain; charset="iso-8859-15"<br><br>On Tuesday 14 March 2006 05:18, Skip Coon wrote:<br>> Hey all,<br>><br>> I am using the KDE bindings for Ruby (Korundum). I have had no luck in
<br>> passing extra CLI args into my program. I have searched and been on irc<br>> but have not had any success.<br>><br>> I want to pass a file into my program like this: foo.rb -f bar.mp3<br>><br>> I think I need to use KDE::
CmdLIneArgs.addCmdLineOptions but when I try and<br>> add a new arg, I get an error that says -f is not valid and give me a (not<br>> very) help screen. I would like to be able to name my argument flags on my<br>> own, not rely on using some of the presets. ie:
foo.rb --config bar.mp3<br><br>The documentation on this is a little bit complex:<br><br><a href="http://tinyurl.com/q7yk2">http://tinyurl.com/q7yk2</a><br><br>In your case it will look like this<br><br>aboutData = KDE::AboutData.new
("foo", "Foo Player", "0.1")<br><br>KDE::CmdLineArgs::init(ARGV, aboutData)<br><br>options = [ [ "f <file>", "input file", "" ] ]<br><br>KDE::CmdLineArgs.addCmdLineOptions
(options)<br><br>app = KDE::Application.new()<br><br>cheers,<br>Kevin<br><br>--<br>Kevin Krammer <<a href="mailto:kevin.krammer@gmx.at">kevin.krammer@gmx.at</a>><br>Qt/KDE Developer, Debian User<br>Moderator: <a href="http://www.mrunix.de">
www.mrunix.de</a> (German), <a href="http://www.qtcentre.org">www.qtcentre.org</a></blockquote><div><br><br>Hey there, <br><br>Thanks a bunch, that did it. :) I saw and read over those docs but just couldn't get that to pan out for me. Right again, those docs didn't really translate very well for Ruby. Thanks again.
<br><br>-scoon<br> </div><br></div><br>