Document that index must be valid in wxChoice::GetString()

This is now the case in all ports, and not just in wxOSX, so document
this behaviour and also document that it has changed compared to 3.0.
This commit is contained in:
Vadim Zeitlin 2021-01-17 00:08:30 +01:00
parent 1ddf2ee303
commit 4a7b6d7e8f
2 changed files with 7 additions and 2 deletions

View File

@ -107,6 +107,8 @@ Changes in behaviour not resulting in compilation errors
- wxGetInstallPrefix() now returns wxString.
- wxChoice::GetString() now consistently asserts when passed an invalid index.
Changes in behaviour which may result in build errors
-----------------------------------------------------

View File

@ -51,11 +51,14 @@ public:
/**
Returns the label of the item with the given index.
The index must be valid, i.e. less than the value returned by
GetCount(), otherwise an assert is triggered. Notably, this function
can't be called if the control is empty.
@param n
The zero-based index.
@return The label of the item or an empty string if the position was
invalid.
@return The label of the item.
*/
virtual wxString GetString(unsigned int n) const = 0;