X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34138703c3997ce676a1e713d9ff9eb020640da7..9df8c2df09b78461a52f8b6d12ee9f3475e8c3da:/include/wx/valtext.h diff --git a/include/wx/valtext.h b/include/wx/valtext.h index b63fcaf4e2..391ed8dfb2 100644 --- a/include/wx/valtext.h +++ b/include/wx/valtext.h @@ -16,6 +16,10 @@ #pragma interface "valtext.h" #endif +#if defined(wxUSE_VALIDATORS) && !wxUSE_VALIDATORS + #error "wxWindows is compiled without support for wxValidator" +#endif + #include "wx/validate.h" #define wxFILTER_NONE 0x0000 @@ -30,7 +34,7 @@ class WXDLLEXPORT wxTextValidator: public wxValidator { DECLARE_DYNAMIC_CLASS(wxTextValidator) public: - wxTextValidator(long style = wxFILTER_NONE, wxString *val = NULL); + wxTextValidator(long style = wxFILTER_NONE, wxString *val = (wxString *) NULL); wxTextValidator(const wxTextValidator& val); ~wxTextValidator(); @@ -39,7 +43,7 @@ public: // if you're passing a reference to a validator. // Another possibility is to always pass a pointer to a new validator // (so the calling code can use a copy constructor of the relevant class). - virtual wxValidator *Clone(void) const { return new wxTextValidator(*this); } + virtual wxObject *Clone(void) const { return new wxTextValidator(*this); } bool Copy(const wxTextValidator& val); // Called when the value in the window must be validated.