List Info

Thread: a bug about Validator???




a bug about Validator???
user name
2006-05-30 09:19:11

At 16:15 27/05/2006, you wrote:
>I find a strange thing in DialogBlocks with VC++ compiler, I even
>don't know it's really a bug or not.
>
>I wrote some codes as follows:
>
>wxTextCtrl* itemTextCtrl6 = new wxTextCtrl( itemDialog1, ID_URL, _T
>(""), wxDefaultPosition, wxSize(195, -1), 0 );
>
>wxTextCtrl* itemTextCtrl12 = new wxTextCtrl( itemDialog1,
>ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
>
>itemTextCtrl6->SetValidator( wxGenericValidator(& m_url) );
>itemTextCtrl12->SetValidator( wxGenericValidator(& m_db) );
>
>
>void IEBlocker::OnWriteClick( wxCommandEvent& event )
>{
>     if ( m_url != _("") ) {
>     m_db = _("u click write button");
>    ; m_url = _("");
>;     TransferDataToWindow();
>     }
>}
>
>
>I call the function when m_url doesn't equal to _(""), and the
>messagebox shows _("u click write button") indeed.
>After I click the "OK" button of the messagebox, itemTextCtrl6 is
>clear(because of I set it to _("")), but itemTextCtrl6 is not _("u
>click write button").

You probably mean "itemTextCtrl12 is not...". I don't really know, but
the best way to find out is to step through the validation code
and see what's going on. I don't think it's a DialogBlocks bug per se
because DB only generates wxWidgets code.

Regards,

Julian


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )