After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588990 - no way to know if the option as been passed when argument is optionnal
no way to know if the option as been passed when argument is optionnal
Status: RESOLVED DUPLICATE of bug 588989
Product: glibmm
Classification: Bindings
Component: general
2.20.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2009-07-19 00:18 UTC by Hubert Figuiere (:hub)
Modified: 2009-07-19 03:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hubert Figuiere (:hub) 2009-07-19 00:18:16 UTC
There is no way to know if the option as been passed when argument is optionnal.

Pending having bug 588989 not crash, I don't find any way to check of said option has been set.

  Glib::ustring search;
  Glib::OptionEntry entry;
  entry.set_long_name("search");
  entry.set_flags(Glib::OptionEntry::FLAG_OPTIONAL_ARG);
  entry.set_description("Open the search all notes window with the search text.");
  options.add_entry(entry, search);


In the above case, if --search is passed, "search" will be empty, like if --search was NOT passed.
Comment 1 Hubert Figuiere (:hub) 2009-07-19 03:08:23 UTC
Actually a dupe of the other

*** This bug has been marked as a duplicate of 588989 ***