2007/4/20, Grzegorz Adam Hankiewicz <ghankiewicz@rastertech.es>:
It may look ugly, but you can create a wx.BusyInfo object, then delete it.
Thank you. BusyInfo is just for this use.
But when I created it and destroyed after operation. I found sometimes
the message cannot be shown (Just the busyInfo itself)... Why??
Because you are blocking the event loop, and so the paint events are not being delivered to the BusyInfo window. Try calling wx.Yield() before you get into your blocking operation.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
## # Method 1: use list
# Clear list items before insert items
self.list.DeleteAllItems()
for index in xrange(len(Sortedrfc)):
self.list.InsertStringItem(index, Sortedrfc[index])
self.list.SetStringItem(index,1, keywordsDict.get(Sortedrfc[index]))
#print rfcNo #print keywords
if match == 0:
self.sb.SetStatusText("No match")
else:
self.sb.SetStatusText("%d matches."%match)
# Close BosyInfo
busy.Destroy()
路路路
2007/4/21, Robin Dunn <robin@alldunn.com>:
Jia Lu wrote:
> 2007/4/20, Grzegorz Adam Hankiewicz <ghankiewicz@rastertech.es>:
>> It may look ugly, but you can create a wx.BusyInfo object, then delete
>> it.
>
> Thank you. BusyInfo is just for this use.
>
> But when I created it and destroyed after operation. I found sometimes
> the message cannot be shown (Just the busyInfo itself)... Why??
Because you are blocking the event loop, and so the paint events are not
being delivered to the BusyInfo window. Try calling wx.Yield() before
you get into your blocking operation.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
--
-- Jia LU
<http://www.lujia.us>
Registered Linux user #434792
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')])
for p in '001akor@liamg.moc'.split('@')])"
--
\ "Unix is an operating system, OS/2 is half an operating system, |
`\ Windows is a shell, and DOS is a boot partition virus." -- |
_o__) Peter H. Coffin |
I tested the cvs file: wxWidgets/wxPython/tests/test_busyinfo.py
It seems sometime cannot display the message too.
So I think if it cannot be shown sometimes under Linux . (Fedora Core 6)
路路路
2007/4/21, Jia Lu <roka100@gmail.com>:
Thanks for your kindness Robin.
In fact I think I did it like below, but it alse happens :
def OnDoSearch(self, evt):
if self.search.GetValue().strip() == "":
self.search.SetValue("")
return
rfcNo =
keywords =
# Show BusyInfo to wait
busy = wx.BusyInfo("One moment please, searching...")
wx.Yield()
## # Method 1: use list
# Clear list items before insert items
self.list.DeleteAllItems()
for index in xrange(len(Sortedrfc)):
self.list.InsertStringItem(index, Sortedrfc[index])
self.list.SetStringItem(index,1, keywordsDict.get(Sortedrfc[index]))
#print rfcNo #print keywords
if match == 0:
self.sb.SetStatusText("No match")
else:
self.sb.SetStatusText("%d matches."%match)
# Close BosyInfo
busy.Destroy()
2007/4/21, Robin Dunn <robin@alldunn.com>:
> Jia Lu wrote:
> > 2007/4/20, Grzegorz Adam Hankiewicz <ghankiewicz@rastertech.es>:
> >> It may look ugly, but you can create a wx.BusyInfo object, then delete
> >> it.
> >
> > Thank you. BusyInfo is just for this use.
> >
> > But when I created it and destroyed after operation. I found sometimes
> > the message cannot be shown (Just the busyInfo itself)... Why??
>
> Because you are blocking the event loop, and so the paint events are not
> being delivered to the BusyInfo window. Try calling wx.Yield() before
> you get into your blocking operation.
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org Java give you jitters? Relax with wxPython!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
>
--
-- Jia LU
<http://www.lujia.us>
Registered Linux user #434792
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')])
for p in '001akor@liamg.moc'.split('@')])"
--
\ "Unix is an operating system, OS/2 is half an operating system, |
`\ Windows is a shell, and DOS is a boot partition virus." -- |
_o__) Peter H. Coffin |
--
-- Jia LU
<http://www.lujia.us>
Registered Linux user #434792
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')])
for p in '001akor@liamg.moc'.split('@')])"
--
\ "Unix is an operating system, OS/2 is half an operating system, |
`\ Windows is a shell, and DOS is a boot partition virus." -- |
_o__) Peter H. Coffin |