Document Connect() limitations compared to Bind()
Instead of just saying that Bind() is better, provide some points illustrating why is it better. Notable mention that Connect() can only be used with methods of the classes publicly inheriting from wxEvtHandler, unlike Bind(). Closes #19266.
This commit is contained in:
parent
34989c614d
commit
9b5a72bd1e
1 changed files with 7 additions and 1 deletions
|
|
@ -710,7 +710,13 @@ public:
|
|||
Notice that Bind() provides a more flexible and safer way to do the
|
||||
same thing as Connect(), please use it in any new code -- while
|
||||
Connect() is not formally deprecated due to its existing widespread
|
||||
usage, it has no advantages compared to Bind().
|
||||
usage, it has no advantages compared to Bind() and has a number of
|
||||
drawbacks, including:
|
||||
|
||||
- Less compile-time safety.
|
||||
- Unintuitive parameter order.
|
||||
- Limited to use with the methods of the classes publicly inheriting
|
||||
from wxEvtHandler.
|
||||
|
||||
This is an alternative to the use of static event tables. It is more
|
||||
flexible as it allows connecting events generated by some object to an
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue