added slightly more informative failure reporting.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ron Lee
2001-12-24 12:12:30 +00:00
parent 9d155f504e
commit 33c5b54b68
2 changed files with 41 additions and 40 deletions

View File

@@ -119,11 +119,7 @@ static bool wxIsAlphaNumeric(const wxString& val)
// This function can pop up an error message.
bool wxTextValidator::Validate(wxWindow *parent)
{
if ( !m_validatorWindow )
return FALSE;
if ( !m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
return FALSE;
if ( !m_stringValue )
if( !CheckValidator() )
return FALSE;
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
@@ -195,11 +191,7 @@ bool wxTextValidator::Validate(wxWindow *parent)
// Called to transfer data to the window
bool wxTextValidator::TransferToWindow(void)
{
if ( !m_validatorWindow )
return FALSE;
if ( !m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
return FALSE;
if ( !m_stringValue )
if( !CheckValidator() )
return FALSE;
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
@@ -211,11 +203,7 @@ bool wxTextValidator::TransferToWindow(void)
// Called to transfer data to the window
bool wxTextValidator::TransferFromWindow(void)
{
if ( !m_validatorWindow )
return FALSE;
if ( !m_validatorWindow->IsKindOf(CLASSINFO(wxTextCtrl)) )
return FALSE;
if ( !m_stringValue )
if( !CheckValidator() )
return FALSE;
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;