> > If you go into the examples/ folder, there's a fairly comprehensive
> > example that Duncan did, called "howto-parse-args.cxx" that
> shows how
> > to go about that.
>
> Be aware that if you need trailing [non-option] arguments, such as
> filenames, that you need to put an explicit '--' in the command line.
>
> ./flApp [options handled by args()] -- file1 file2 file3 ...
>
> I always forget the '--', and then wonder why I get an error message
Huh?
I've never done that... The "full" form of Fl::args(...) returns an int
value that basically points at the first "non-option" parameter, then I
just parse the filename (or whatever) directly by counting up through
any remaining args...
Dodgy pseudo-code:
int used = Fl::args(...stuff...);
if (used < argc) {
// process reamining switches "by hand"
for(int x = used; x < argc; x++)....
}
That kind of thing.
Always *seems* to have worked OK for me, anyway.
SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk