[kde-linux] KDE and Ruby
Skip Coon
scoon2004 at gmail.com
Tue Mar 14 11:42:07 UTC 2006
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 14 Mar 2006 11:17:12 +0100
> From: Kevin Krammer <kevin.krammer at gmx.at>
> Subject: Re: [kde-linux] KDE and Ruby
> To: kde-linux at kde.org
> Message-ID: <200603141117.19629.kevin.krammer at gmx.at>
> Content-Type: text/plain; charset="iso-8859-15"
>
> On Tuesday 14 March 2006 05:18, Skip Coon wrote:
> > Hey all,
> >
> > I am using the KDE bindings for Ruby (Korundum). I have had no luck in
> > passing extra CLI args into my program. I have searched and been on irc
> > but have not had any success.
> >
> > I want to pass a file into my program like this: foo.rb -f bar.mp3
> >
> > I think I need to use KDE::CmdLIneArgs.addCmdLineOptions but when I try
> and
> > add a new arg, I get an error that says -f is not valid and give me a
> (not
> > very) help screen. I would like to be able to name my argument flags on
> my
> > own, not rely on using some of the presets. ie: foo.rb --config bar.mp3
>
> The documentation on this is a little bit complex:
>
> http://tinyurl.com/q7yk2
>
> In your case it will look like this
>
> aboutData = KDE::AboutData.new("foo", "Foo Player", "0.1")
>
> KDE::CmdLineArgs::init(ARGV, aboutData)
>
> options = [ [ "f <file>", "input file", "" ] ]
>
> KDE::CmdLineArgs.addCmdLineOptions(options)
>
> app = KDE::Application.new()
>
> cheers,
> Kevin
>
> --
> Kevin Krammer <kevin.krammer at gmx.at>
> Qt/KDE Developer, Debian User
> Moderator: www.mrunix.de (German), www.qtcentre.org
Hey there,
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.
-scoon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-linux/attachments/20060314/4dddcc51/attachment.html>
More information about the kde-linux
mailing list