Page 1 of 1

wxListCtrl virtual style

Posted: Wed May 13, 2020 4:09 am
by sedin
Hi
In wxListCtrl virtual style,
I uses wxLogError in OnGetItemText.
and the application is crashed.
Could you explain why this happens?
And If I want to use wxLogXXX, How can I modify it?

Thanks.

Re: wxListCtrl virtual style

Posted: Wed May 13, 2020 5:31 am
by PB
sedin wrote:
Wed May 13, 2020 4:09 am
Hi
In wxListCtrl virtual style,
I uses wxLogError in OnGetItemText.
and the application is crashed.
Could you explain why this happens?
You must be doing something wrong. Hard to say what as you did not post any code.

It may be possible that the logging system gets overloaded if one calls wxLogError() on each OnGetItemText() call, but why would someone do that? That would be as bad as doing the same e.g. in the paint event handler, i.e., triggering an endless loop of error messages.