[Gambas-user] gb.args - a question

Bruce bbruen at ...2308...
Sat Feb 16 02:15:47 CET 2013


I meant..

On Sat, 2013-02-16 at 08:59 +1030, Bruce wrote:
> On Fri, 2013-02-15 at 23:07 +0100, Willy Raets wrote:
> 
> > 
> > 3. For: Arguments -a
> > Arguments: argument missing for option -a
> > 
> > How do I get this -a to work? What am I missing?
> > Any suggestions or a small example would do miracles.
> > 
> 
> Args.Get(...) returns a string value, as you have correctly coded
> "sAbout = Args.Get("a", "about", "To test gb.args in GUI application")"
> 
> So, if you run the project using just
> ./projname -a
> then it correctly says "argument missing for option -a".

You need to 
./projname -a 'something goes here'

> 
> Solution: 
> 1. Fix user :-)
> 
> If you just want a program option, that is one that does not have an
> associated value, then use Args.Has()
> 
> e.g.
> 
> Dim sAOption as Boolean
> ...
> sAOption=Args.Has("a",""about", "To test gb.args in GUI application")
> ...
> 
> 
> hth
> Bruce
> 






More information about the User mailing list