
On 30 Nov 2004, at 1:33 pm, Vladimir Prus wrote:
Hi Tony,
Hi V, I heard of you before. Thank you for reply.
This example misses one important piece -- the call to "nofity" function. As mentioned in
http://boost.org/doc/html/program_options/overview.html#id548990
the user-provided notifiers are called by the "program_options::notify" function.
I do have a call to notify (See below) in the example but do you mean notify (my_function1) ? boost::program_options::store(boost::program_options:: parse_command_line(argc, argv, menu), menu_map); boost::program_options::notify(menu_map); I don't know if you tried to use this library but it seems the documentation regarding notify is wrong (Or I'm wrong). Try to compile the exact example given by the docs results in an error. replace notify by notifier will cause the function to be called. Maybe I'm missing something here.
The order of invocation is independed of the order on the command line, it's just lexicographical order of the option names.
I don't like this. If what you claim is true then I'm losing control over the program.
Why do you need specific order?
There's no guarantee at all. The idea is most of the time you don't need specific order. If you describe your problem, I might offer more specific help.
What I wanted is to have the user line up their request to the program as options on the command line and each time an option is read, something will happen as the order they were read. I would like to collect some option information as first like files in the example but it's not essential. What you are saying is that these options are treated as arguments to functions but I want them to act more like commands to the program that will cause some action, so any option has a purpose and a place as when and where to be used instead of dumping all to the program as configurations. You seems very certain of what you are saying. Could you send me the link of the documents or notes from the developer of this library that confirm this behaviour?
- Volodya
Thanks again. I hope you don't mind if I put your e-mail address into my address book. I would like to talk again. Regards, Tony Han Bao tonybao@mac.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost