|
From: Chunlin Z. <zha...@gm...> - 2010-08-19 05:25:39
|
于 2010年05月14日 21:57, Chunlin Zhang 写道:
> Now I use the way that main thread handle the "wxEVT_IDLE",in this event
> handle I try to receive data.And it works
>
In linux(I use ubuntu),I found that wxEVT_IDLE only happy when mouse
move in mainframe,so I have create a timer to run the function.
'''
--idle event,continue to find message to handle again and again
mainframe:Connect(wx.wxEVT_IDLE,
function(event)
mainframe_on_idle(mainframe,event)
end)
--in linux,wxEVT_IDLE only happy when mouse move in mainframe
--so I create a timer for doing mainframe_on_idle
local timer = wx.wxTimer(mainframe)
mainframe:Connect(wx.wxEVT_TIMER,
function(event)
mainframe_on_idle(mainframe,event)
end)
timer:Start(800)
'''
|