Opened 4 years ago

Closed 4 years ago

#12038 closed defect (fixed)

wxString::Printf documentation regression

Reported by: Auria Owned by:
Priority: normal Milestone:
Component: documentation Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: yes

Description

The 2.8 docs ( http://docs.wxwidgets.org/stable/wx_wxstring.html#wxstringprintf ) say :

Note that if wxUSE_PRINTF_POS_PARAMS is set to 1, then this function supports Unix98-style positional parameters:

    wxString str;

    str.Printf(wxT("%d %d %d"), 1, 2, 3);
    // str now contains "1 2 3"

    str.Printf(wxT("%2$d %3$d %1$d"), 1, 2, 3);
    // str now contains "2 3 1"

In trunk docs ( http://docs.wxwidgets.org/trunk/classwx_string.html#9588b7f2684b9a6a924dc3746a2b2f8d ), however :

Note that if wxUSE_PRINTF_POS_PARAMS is set to 1, then this function supports Unix98-style positional parameters:

And there obviously is a bit missing. Attached is a patch to correct this.

Attachments (1)

string_doc.patch download (834 bytes) - added by Auria 4 years ago.

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by Auria

comment:1 Changed 4 years ago by vadz

  • Status changed from new to confirmed

Yes, in fact it looks like many (all?) code examples in verbatim blocks have been lost during conversion to Doxygen :-( We probably should write some script grepping 2.8 docs and checking which of the examples are still there (doing it by hand won't be fun considering that there are 643 such blocks).

Anyhow, thanks for fixing this one!

comment:2 Changed 4 years ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [64294]) Restore wxString::Printf() example showing position parameters in the docs.

The example was lost during the translation of the manual to Doxygen.

Closes #12038.

Note: See TracTickets for help on using tickets.