ToasterBox problem

Hi all and especially Andrea,

I am trying to use the ToasterBox in my application. However while the
ToasterBox demo works perfectly when I copy it into my application
practically line for line I have a problem, the box appears, moves, text
flashes but then when the box stops the text is not shown, the box is blank

Has anyone seen this before? Is does this have anything to do with the
fact that the ToasterBox inherits from wx.Timer and I am already using
the timer???

any help would really be appreciated!

Paul

···

--
Paul Sijben tel: +31334566488
Eemvalley Technology BV fax: +31334557523
the Netherlands http://eemvalley.com
-----------------------------------------------------
EemValley Technology werft python & wxpython
programmeurs: http://www.eemvalley.nl/jobs

Paul,

Hi all and especially Andrea,

I am trying to use the ToasterBox in my application. However while the
ToasterBox demo works perfectly when I copy it into my application
practically line for line I have a problem, the box appears, moves, text
flashes but then when the box stops the text is not shown, the box is blank

Has anyone seen this before? Is does this have anything to do with the
fact that the ToasterBox inherits from wx.Timer and I am already using
the timer???

any help would really be appreciated!

Paul

What OS and wx version are you on? I have used the Toasterbox successfully on Windows XP, although I think it had a small issue if it was running when my PC was restarted...

Anyway, I just copied the ToasterBox.py file into a location on my path and then imported it into one of my scripts, like this: "import ToasterBox as TB". Then I initialized it like this: "tb = TB.ToasterBox(frameObj, tbstyle, windowstyle, closingstyle)" and then set various other options. In my application, I have 2 other timer instances running with one of them firing off the ToasterBox, so I don't think this could be an issue unless you're somehow doing some name shadowing.

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

Mike I am testing it on Ubuntu 8.10 with the wx version that is supplied
with that.

I just found out that the problem was NOT setting a background image.
This seems to me a bug or is it a feature?

Mike Driscoll wrote:

···

Paul,

Hi all and especially Andrea,

I am trying to use the ToasterBox in my application. However while the
ToasterBox demo works perfectly when I copy it into my application
practically line for line I have a problem, the box appears, moves, text
flashes but then when the box stops the text is not shown, the box is
blank

Has anyone seen this before? Is does this have anything to do with the
fact that the ToasterBox inherits from wx.Timer and I am already using
the timer???

any help would really be appreciated!

Paul

What OS and wx version are you on? I have used the Toasterbox
successfully on Windows XP, although I think it had a small issue if
it was running when my PC was restarted...

Anyway, I just copied the ToasterBox.py file into a location on my
path and then imported it into one of my scripts, like this: "import
ToasterBox as TB". Then I initialized it like this: "tb =
TB.ToasterBox(frameObj, tbstyle, windowstyle, closingstyle)" and then
set various other options. In my application, I have 2 other timer
instances running with one of them firing off the ToasterBox, so I
don't think this could be an issue unless you're somehow doing some
name shadowing.

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

--
Paul Sijben tel: +31334566488
Eemvalley Technology BV fax: +31334557523
the Netherlands http://eemvalley.com
-----------------------------------------------------
EemValley Technology werft python & wxpython
programmeurs: http://www.eemvalley.nl/jobs

Paul,

Mike I am testing it on Ubuntu 8.10 with the wx version that is supplied
with that.

I just found out that the problem was NOT setting a background image.
This seems to me a bug or is it a feature?
  
Hmmm...I don't know for sure, but I'm guessing bug. Andrea can probably shed light on the matter. I'm pretty sure he accepts patches, so if you want to fix it and send the patch to him, he'd probably update the widget.

Mike Driscoll wrote:
  

Paul,

Hi all and especially Andrea,

I am trying to use the ToasterBox in my application. However while the
ToasterBox demo works perfectly when I copy it into my application
practically line for line I have a problem, the box appears, moves, text
flashes but then when the box stops the text is not shown, the box is
blank

Has anyone seen this before? Is does this have anything to do with the
fact that the ToasterBox inherits from wx.Timer and I am already using
the timer???

any help would really be appreciated!

Paul

What OS and wx version are you on? I have used the Toasterbox
successfully on Windows XP, although I think it had a small issue if
it was running when my PC was restarted...

Anyway, I just copied the ToasterBox.py file into a location on my
path and then imported it into one of my scripts, like this: "import
ToasterBox as TB". Then I initialized it like this: "tb =
TB.ToasterBox(frameObj, tbstyle, windowstyle, closingstyle)" and then
set various other options. In my application, I have 2 other timer
instances running with one of them firing off the ToasterBox, so I
don't think this could be an issue unless you're somehow doing some
name shadowing.

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

Mike

Hi Paul,

Mike I am testing it on Ubuntu 8.10 with the wx version that is supplied
with that.

I just found out that the problem was NOT setting a background image.
This seems to me a bug or is it a feature?

Could yoi please tell me in which way you are constructing the
ToasterBox and which parameter are you passing to it? Can you share
the ToasterBox-related part of your program? It might be a bug,
although I am not sure where the problem may be.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On Tue, Dec 9, 2008 at 10:01 AM, Paul Sijben wrote:

Hi Andrea,

below is the code. It breaks when I do tb.SetPopupBitmap() instead of
the file to the image.

`def OnToast(self,evt):

    message,title,background,Image,timeout,font=evt.data

    if title:

        windowstyle = TB.TB_CAPTION

    else:

        windowstyle = TB.DEFAULT_TB_STYLE

    tbstyle = TB.TB_SIMPLE

    closingstyle = TB.TB_ONTIME

    tb = TB.ToasterBox(self, tbstyle, windowstyle, closingstyle)

    if windowstyle == TB.TB_CAPTION:

        tb.SetTitle(title)

    mx,my,mw,mh=wx.Display().GetClientArea()

    sizex=int(mw/8)

    sizey=int(mh/8)

    tb.SetPopupSize((sizex, sizey))

    posx=mw-sizex

    posy=mh-sizey

    tb.SetPopupPosition((posx, posy))

    #print sizex, sizey, posx,posy

    tb.SetPopupPauseTime(4000)

    tb.SetPopupScrollSpeed(8)

    tb.SetPopupBackgroundColor(wx.WHITE)

    tb.SetPopupTextColor(wx.BLACK)

    #tb.SetPopupBitmap()

    tb.SetPopupBitmap('/home/sijben/ORCA/src/bg.bmp')

    tb.SetPopupText(message)

    tb.SetPopupTextFont(font)

    tb.Play()`

Andrea Gavana wrote:

···

http://xoomer.alice.it/infinity77/wxpython-users@lists.wxwidgets.orghttp://lists.wxwidgets.org/mailman/listinfo/wxpython-users

-- Paul Sijben tel: +31334566488
Eemvalley Technology BV fax: +31334557523
the Netherlands -----------------------------------------------------
EemValley Technology werft python & wxpython programmeurs:

http://eemvalley.comhttp://www.eemvalley.nl/jobs

Hi Paul,

Hi Andrea,

below is the code. It breaks when I do tb.SetPopupBitmap() instead of the
file to the image.

Well, as it is implemented now, SetPopupBitmap is expecting a file
name, not ready-to-use wx.Bitmap, or a "None" arguments, which is the
default when you don't pass any parameter. Uhm, this is pretty
curious, it works on Windows XP (I have tried with the demo), not sure
why is not working on Ubuntu. Does anything happen if you remove
altogether the call to SetPopupBitmap?

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

On Wed, Dec 10, 2008 at 9:15 AM, Paul Sijben wrote:

Andrea Gavana wrote:

Does anything happen if you remove
altogether the call to SetPopupBitmap?

the empty window again

···

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
  
--
Paul Sijben tel: +31334566488
Eemvalley Technology BV fax: +31334557523
the Netherlands http://eemvalley.com
-----------------------------------------------------
EemValley Technology werft python & wxpython
programmeurs: http://www.eemvalley.nl/jobs