How to use miniFrame to show temporarily.

Thank you. BusyInfo is just for this use. :slight_smile:

But when I created it and destroyed after operation. I found sometimes
the message cannot be shown (Just the busyInfo itself)... Why??

路路路

2007/4/20, Grzegorz Adam Hankiewicz <ghankiewicz@rastertech.es>:

It may look ugly, but you can create a wx.BusyInfo object, then delete it.

Jia Lu wrote:

Thank you. BusyInfo is just for this use. :slight_smile:

But when I created it and destroyed after operation. I found sometimes
the message cannot be shown (Just the busyInfo itself)... Why??

You will need to ellaborate on that problem to get helpful answers.

路路路

--
     Rastertech Espa帽a S.A.
  Grzegorz Adam Hankiewicz
/Jefe de Producto TeraVial/

C/ Perfumer铆a 21. Nave I. Pol铆gono industrial La Mina
28770 Colmenar Viejo. Madrid (Espa帽a)
Tel. +34 918 467 390 (Ext.17) *路* Fax +34 918 457 889
ghankiewicz@rastertech.es *路* www.rastertech.es
<http://www.rastertech.es/&gt;

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. :slight_smile:

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!

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()

        rfcNo, keywords, match = rfc.search_rfc(self.search.GetValue().strip())
        Sortedrfc = rfcNo[:]
        Sortedrfc.sort()
        keywordsDict = dict(zip(rfcNo, keywords))

## # 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. :slight_smile:
>
> 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 |

Hi Robin

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()

        rfcNo, keywords, match = rfc.search_rfc(self.search.GetValue().strip())
        Sortedrfc = rfcNo[:]
        Sortedrfc.sort()
        keywordsDict = dict(zip(rfcNo, keywords))

## # 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. :slight_smile:
> >
> > 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 |