【发布时间】:2011-02-17 08:17:06
【问题描述】:
我想在 wxListCtrl 中填充数据库表,我可以这样做,我为此使用 wxThread。我的问题是 - 我的概念适用于少量数据,当我增加大小时,它会显示错误 -
showingdatainwxlistctrl: ../../src/XlibInt.c:595: _XPrivSyncFunction: Assertion `dpy->synchandler == _XPrivSyncFunction' failed.
我的代码如下:-
void *MyThread :: Entry()
{
int i=1,j,k=0 ;
while(i!=400)
{
long index=this->temp->data_list_control->InsertItem(i,wxT("amit"));
for(j=1;j<3;j++)
{
this->temp->data_list_control->SetItem(index,j,wxT("pathak"));
}
k++;
if(k==30)
{
this->Sleep(1000);
k=0;
}
i++;
}
}
如果我使用 i =4, 10 100,它正在工作,但我超过了限制(我不知道在什么时候)它开始显示错误 如果您有任何建议,请帮助我...
【问题讨论】: