Ticket #2146 (closed enhancement: fixed)
Copy constructor for wxValidator
| Reported by: | hwiesmann | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | GUI-generic | Version: | |
| Keywords: | simple | Cc: | hwiesmann, abxabx |
| Blocked By: | Patch: | yes | |
| Blocking: |
Description
When implementing a new validator class the a new class has to
be derived from wxValidator. wxValidator requires to overload the
Clone function. A clone function is often implemented like:
wxObject* Clone(void) const {return new(*this);}
Therefore, the derived class has to implement a copy constructor.
Unfortunately, wxValidator does not have a copy constructor
implemented. Therefore, in the copy constructor of the derived
function, first, the default wxValidator constructor has to be called
and afterwards the copy function of wxValidator.
This looks very ugly. A copy constructor of wxValidator should
solve this issue.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

