Re: Re: WxImageButton on Linux
Robin Dunn <[email protected]> Tue, 23 Apr 2019 15:22:02 -0700 (PDT)
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_659_1708888077.1556058122174 Content-Type: multipart/alternative; boundary="----=_Part_660_2063830953.1556058122175" ------=_Part_660_2063830953.1556058122175 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm not sure in what universe that 109,405 lines of Python code, plus tons= =20 of data files, that uses matplotlib and scipy is considered a "small=20 stand-alone sample" but in this universe it isn't. -- Robin On Tuesday, April 23, 2019 at 1:37:29 PM UTC-7, philippe DALET wrote: > > Robin > > Get this file=20 > https://www.dropbox.com/s/0dbsnmkrcfzgegx/avancement.tar.gz?dl=3D0 > > untar the file, then launch run.sh. > > Philippe > > Le lun. 22 avr. 2019 =C3=A0 17:23, Robin Dunn <[email protected]> a =C3= =A9crit : > >> Philippe, >> >> Can you duplicate the problem in a small stand-alone sample? >> >> -- >> Robin >> >> >> On Sunday, April 21, 2019 at 2:48:31 PM UTC-7, philippe DALET wrote: >>> >>> Hello robin, >>> >>> This bug does not come necessarily from wxpython.=20 >>> >>> With python 3.7.2 on Windows seven, this bug was already present. No=20 >>> more with python 3.7.3. >>> >>> Philippe. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> Le sam. 20 avr. 2019 =C3=A0 02:14, Robin Dunn <[email protected]> a =C3= =A9crit : >>> >>>> On Friday, April 19, 2019 at 5:06:32 PM UTC-7, Robin Dunn wrote: >>>>> >>>>> On Friday, April 19, 2019 at 12:53:40 PM UTC-7, philippe DALET wrote: >>>>>> >>>>>> Yes, self._bitmap.getBits() is returning a wx.Bitmap. >>>>>> It runs properly on windows. It seems that it expects another=20 >>>>>> parameter.=20 >>>>>> >>>>>> Is it possible to debug with python, then in C with an IDE on linux = ? >>>>>> >>>>> >>>>> >>>>> The C++ wrapper code where that exception is raised is identical on= =20 >>>>> each platform and it hasn't yet gotten to any platform-dependent wxWi= dgets=20 >>>>> code, it's just type-checking the parameters to decide which=20 >>>>> wxBitmapButton constructor to call. So if it works on one platform an= d not=20 >>>>> another then it must be differences in the inputs from the Python sid= e of=20 >>>>> things. >>>>> >>>>> Ah, I just noticed something odd: >>>>> >>>>> > File=20 >>>>> "/usr/local/lib/python3.6/dist-packages/PythonCard/components/imagebu= tton.py",=20 >>>>> line 56, in __init__ >>>>> > wx.BitmapButton.__init__(self, parent, id,=20 >>>>> self._bitmap.getBits(),pos, size, style, validator, name) >>>>> > TypeError: *Control():* arguments did not match any overloaded call= : >>>>> >>>>> Somehow it is not trying to call wx.BitmapButton.__init__ but=20 >>>>> wx.Control's __init__. Does PythonCard do any monkey-patching or some= thing=20 >>>>> that could be replacing wx.BitmapButton with wx.Control? >>>>> >>>> >>>> >>>> For example, I can duplicate the exception with code like this: >>>> >>>> wx.BitmapButton =3D wx.Control >>>> class TestButton(wx.BitmapButton): >>>> def __init__(self, parent, id, bmp, pos=3Dwx.DefaultPosition,=20 >>>> size=3Dwx.DefaultSize, style=3D0: >>>> wx.BitmapButton.__init__(self, parent, id, bmp, pos, size,=20 >>>> style) >>>> >>>> =20 >>>> -- >>>> Robin >>>> >>>> --=20 >>>> You received this message because you are subscribed to the Google=20 >>>> Groups "wxPython-dev" group. >>>> To unsubscribe from this group and stop receiving emails from it, send= =20 >>>> an email to [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> --=20 >> You received this message because you are subscribed to the Google Group= s=20 >> "wxPython-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n=20 >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > --=20 You received this message because you are subscribed to the Google Groups "= wxPython-dev" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. For more options, visit https://groups.google.com/d/optout. ------=_Part_660_2063830953.1556058122175 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">I'm not sure in what universe that=C2=A0109,405 lines = of Python code, plus tons of data files, that uses matplotlib and scipy is = considered a "small stand-alone sample" but in this universe it i= sn't.<div><br></div><div>--</div><div>Robin</div><div><br><br>On Tuesda= y, April 23, 2019 at 1:37:29 PM UTC-7, philippe DALET wrote:<blockquote cla= ss=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #= ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div dir=3D"ltr">Robin<div><= br></div><div>Get this file=C2=A0</div><div><a href=3D"https://www.dropbox.= com/s/0dbsnmkrcfzgegx/avancement.tar.gz?dl=3D0" target=3D"_blank" rel=3D"no= follow" onmousedown=3D"this.href=3D'https://www.google.com/url?q\x3dhtt= ps%3A%2F%2Fwww.dropbox.com%2Fs%2F0dbsnmkrcfzgegx%2Favancement.tar.gz%3Fdl%3= D0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHtIgLs43-YBqX_86asBx8lcin09Q'= ;;return true;" onclick=3D"this.href=3D'https://www.google.com/url?q\x3= dhttps%3A%2F%2Fwww.dropbox.com%2Fs%2F0dbsnmkrcfzgegx%2Favancement.tar.gz%3F= dl%3D0\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHtIgLs43-YBqX_86asBx8lcin09Q= ';return true;">https://www.dropbox.com/s/<wbr>0dbsnmkrcfzgegx/avanceme= nt.<wbr>tar.gz?dl=3D0</a><br></div><div><br></div><div>untar the file, then= launch run.sh.</div><div><br></div><div>Philippe</div></div></div><br><div= class=3D"gmail_quote"><div dir=3D"ltr">Le=C2=A0lun. 22 avr. 2019 =C3=A0=C2= =A017:23, Robin Dunn <<a href=3D"mailto:[email protected]" target=3D"_bl= ank" rel=3D"nofollow" onmousedown=3D"this.href=3D'mailto:robin@alldunn.= com';return true;" onclick=3D"this.href=3D'mailto:[email protected]= ';return true;">[email protected]</a>> a =C3=A9crit=C2=A0:<br></div>= <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div>Phi= lippe,<br></div><div><br></div>Can you duplicate the problem in a small sta= nd-alone sample?<div><br></div><div>--</div><div>Robin</div><div><br><br>On= Sunday, April 21, 2019 at 2:48:31 PM UTC-7, philippe DALET wrote:<blockquo= te class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px = solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr">= <div dir=3D"ltr">Hello robin,<div><br></div><div>This bug=C2=A0does not com= e necessarily from wxpython.=C2=A0</div><div><br></div><div>With python 3.7= .2 on Windows seven, this bug was=C2=A0already present. No more with python= 3.7.3.</div><div><br></div><div>Philippe.</div><div><br></div><div><br></d= iv><div><br></div><div><br></div><div><br></div><div><br></div><div><br></d= iv><div><br></div><div><br></div></div></div></div><br><div class=3D"gmail_= quote"><div dir=3D"ltr">Le=C2=A0sam. 20 avr. 2019 =C3=A0=C2=A002:14, Robin = Dunn <<a href=3D"mailto:[email protected]" rel=3D"nofollow" target=3D"_b= lank" onmousedown=3D"this.href=3D'mailto:[email protected]';return = true;" onclick=3D"this.href=3D'mailto:[email protected]';return tru= e;">[email protected]</a>> a =C3=A9crit=C2=A0:<br></div><blockquote clas= s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r= gb(204,204,204);padding-left:1ex"><div dir=3D"ltr">On Friday, April 19, 201= 9 at 5:06:32 PM UTC-7, Robin Dunn wrote:<blockquote class=3D"gmail_quote" s= tyle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pad= ding-left:1ex"><div dir=3D"ltr">On Friday, April 19, 2019 at 12:53:40 PM UT= C-7, philippe DALET wrote:<blockquote class=3D"gmail_quote" style=3D"margin= :0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"= ><div dir=3D"ltr">Yes, self._bitmap.getBits() is returning a wx.Bitmap.<div= >It runs properly on windows. It seems that it expects another parameter.= =C2=A0</div><div><br></div><div>Is it possible to debug with python, then i= n C with an IDE on linux ?</div></div></blockquote><div><br></div><div><br>= </div><div>The C++ wrapper code where that exception is raised is identical= on each platform and it hasn't yet gotten to any platform-dependent wx= Widgets code, it's just type-checking the parameters to=C2=A0 decide wh= ich wxBitmapButton constructor to call. So if it works on one platform and = not another then it must be differences in the inputs from the Python side = of things.</div><div><br></div><div>Ah, I just noticed something odd:</div>= <div><br></div><div><div>>=C2=A0 File "/usr/local/lib/python3.6/<wb= r>dist-packages/PythonCard/<wbr>components/imagebutton.py", line 56, i= n __init__</div><div>>=C2=A0 =C2=A0 =C2=A0wx.BitmapButton.__init__(<wbr>= self, parent, id, self._bitmap.getBits(),pos, size, style, validator, name)= </div><div>> TypeError: <b><font color=3D"#ff0000">Control():</font></b>= arguments did not match any overloaded call:</div></div><div><br></div><di= v>Somehow it is not trying to call wx.BitmapButton.__init__ but wx.Control&= #39;s __init__. Does PythonCard do any monkey-patching or something that co= uld be replacing wx.BitmapButton with wx.Control?</div></div></blockquote><= div><br></div><div><br></div><div>For example, I can duplicate the exceptio= n with code like this:</div><div><br></div><div><div><font face=3D"courier = new, monospace">wx.BitmapButton =3D wx.Control</font></div><div><font face= =3D"courier new, monospace">class TestButton(wx.BitmapButton):</font></div>= <div><font face=3D"courier new, monospace">=C2=A0 =C2=A0 def __init__(self,= parent, id, bmp, pos=3Dwx.DefaultPosition, size=3Dwx.DefaultSize, style=3D= 0:</font></div><div><span style=3D"font-family:"courier new",mono= space">=C2=A0 =C2=A0 =C2=A0 =C2=A0 wx.BitmapButton.__init__(self, parent, i= d, bmp, pos, size, style)</span><br></div></div><div><font face=3D"courier = new, monospace"><br></font></div><div>=C2=A0</div><div>--</div><div>Robin</= div><div><br></div></div> <p></p> -- <br> You received this message because you are subscribed to the Google Groups &= quot;wxPython-dev" group.<br> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]" rel=3D= "nofollow" target=3D"_blank" onmousedown=3D"this.href=3D'mailto:wxPytho= [email protected]';return true;" onclick=3D"this.href= =3D'mailto:[email protected]';return true;"= >wxPython-dev+unsubscribe@<wbr>googlegroups.com</a>.<br> For more options, visit <a href=3D"https://groups.google.com/d/optout" rel= =3D"nofollow" target=3D"_blank" onmousedown=3D"this.href=3D'https://gro= ups.google.com/d/optout';return true;" onclick=3D"this.href=3D'http= s://groups.google.com/d/optout';return true;">https://groups.google.com= /d/<wbr>optout</a>.<br> </blockquote></div> </blockquote></div></div> <p></p> -- <br> You received this message because you are subscribed to the Google Groups &= quot;wxPython-dev" group.<br> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]" target= =3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'mailto:wxPytho= [email protected]';return true;" onclick=3D"this.href= =3D'mailto:[email protected]';return true;"= >wxPython-dev+unsubscribe@<wbr>googlegroups.com</a>.<br> For more options, visit <a href=3D"https://groups.google.com/d/optout" targ= et=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D'https://grou= ps.google.com/d/optout';return true;" onclick=3D"this.href=3D'https= ://groups.google.com/d/optout';return true;">https://groups.google.com/= d/<wbr>optout</a>.<br> </blockquote></div> </blockquote></div></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;wxPython-dev" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">wxPyth= [email protected]</a>.<br /> For more options, visit <a href=3D"https://groups.google.com/d/optout">http= s://groups.google.com/d/optout</a>.<br /> ------=_Part_660_2063830953.1556058122175-- ------=_Part_659_1708888077.1556058122174--