Re: Re: WxImageButton on Linux

philippe DALET <[email protected]> Tue, 23 Apr 2019 22:37:15 +0200
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <CAPq9+MORu7SoSOi98bRB=DbPeBp=TTtvEWoCQ76O42esp-3JRQ@mail.gmail.com>
--00000000000099927d0587388d3b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Robin

Get this file
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=A9c=
rit :

> 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.
>>
>> With python 3.7.2 on Windows seven, this bug was already present. No mor=
e
>> 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
>>>>> parameter.
>>>>>
>>>>> 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
>>>> each platform and it hasn't yet gotten to any platform-dependent wxWid=
gets
>>>> code, it's just type-checking the parameters to  decide which
>>>> 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.
>>>>
>>>> Ah, I just noticed something odd:
>>>>
>>>> >  File
>>>> "/usr/local/lib/python3.6/dist-packages/PythonCard/components/imagebut=
ton.py",
>>>> line 56, in __init__
>>>> >     wx.BitmapButton.__init__(self, parent, id,
>>>> 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
>>>> wx.Control's __init__. Does PythonCard do any monkey-patching or somet=
hing
>>>> 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,
>>> size=3Dwx.DefaultSize, style=3D0:
>>>         wx.BitmapButton.__init__(self, parent, id, bmp, pos, size, styl=
e)
>>>
>>>
>>> --
>>> Robin
>>>
>>> --
>>> 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 email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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
> 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.

--00000000000099927d0587388d3b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<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/avanceme=
nt.tar.gz?dl=3D0">https://www.dropbox.com/s/0dbsnmkrcfzgegx/avancement.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"gm=
ail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Le=C2=A0lun. 22 avr. 2019 =
=C3=A0=C2=A017:23, Robin Dunn &lt;<a href=3D"mailto:[email protected]">robi=
[email protected]</a>&gt; a =C3=A9crit=C2=A0:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex"><div dir=3D"ltr"><div>Philippe,<br></div><div><br=
></div>Can you duplicate the problem in a small stand-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:<blockquote class=3D"gmail_quote"=
 style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p=
adding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr">Hello r=
obin,<div><br></div><div>This bug=C2=A0does not come necessarily from wxpyt=
hon.=C2=A0</div><div><br></div><div>With python 3.7.2 on Windows seven, thi=
s bug was=C2=A0already present. No more with python 3.7.3.</div><div><br></=
div><div>Philippe.</div><div><br></div><div><br></div><div><br></div><div><=
br></div><div><br></div><div><br></div><div><br></div><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 &lt;<a href=3D"mail=
to:[email protected]" rel=3D"nofollow" target=3D"_blank">[email protected]<=
/a>&gt; a =C3=A9crit=C2=A0:<br></div><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);paddin=
g-left:1ex"><div dir=3D"ltr">On Friday, April 19, 2019 at 5:06:32 PM UTC-7,=
 Robin Dunn 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 di=
r=3D"ltr">On Friday, April 19, 2019 at 12:53:40 PM UTC-7, philippe DALET wr=
ote:<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bor=
der-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 w=
indows. It seems that it expects another parameter.=C2=A0</div><div><br></d=
iv><div>Is it possible to debug with python, then in C with an IDE on linux=
 ?</div></div></blockquote><div><br></div><div><br></div><div>The C++ wrapp=
er code where that exception is raised is identical on each platform and it=
 hasn&#39;t yet gotten to any platform-dependent wxWidgets code, it&#39;s j=
ust type-checking the parameters to=C2=A0 decide which wxBitmapButton const=
ructor 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=
>&gt;=C2=A0 File &quot;/usr/local/lib/python3.6/dist-packages/PythonCard/co=
mponents/imagebutton.py&quot;, line 56, in __init__</div><div>&gt;=C2=A0 =
=C2=A0 =C2=A0wx.BitmapButton.__init__(self, parent, id, self._bitmap.getBit=
s(),pos, size, style, validator, name)</div><div>&gt; TypeError: <b><font c=
olor=3D"#ff0000">Control():</font></b> arguments did not match any overload=
ed call:</div></div><div><br></div><div>Somehow it is not trying to call wx=
.BitmapButton.__init__ but wx.Control&#39;s __init__. Does PythonCard do an=
y monkey-patching or something that could be replacing wx.BitmapButton with=
 wx.Control?</div></div></blockquote><div><br></div><div><br></div><div>For=
 example, I can duplicate the exception with code like this:</div><div><br>=
</div><div><div><font face=3D"courier new, monospace">wx.BitmapButton =3D w=
x.Control</font></div><div><font face=3D"courier new, monospace">class Test=
Button(wx.BitmapButton):</font></div><div><font face=3D"courier new, monosp=
ace">=C2=A0 =C2=A0 def __init__(self, parent, id, bmp, pos=3Dwx.DefaultPosi=
tion, size=3Dwx.DefaultSize, style=3D0:</font></div><div><span style=3D"fon=
t-family:&quot;courier new&quot;,monospace">=C2=A0 =C2=A0 =C2=A0 =C2=A0 wx.=
BitmapButton.__init__(self, parent, id, 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&quot; 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">[email protected]</a>.=
<br>
For more options, visit <a href=3D"https://groups.google.com/d/optout" rel=
=3D"nofollow" target=3D"_blank">https://groups.google.com/d/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&quot; 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">[email protected]</a>.<br>
For more options, visit <a href=3D"https://groups.google.com/d/optout" targ=
et=3D"_blank">https://groups.google.com/d/optout</a>.<br>
</blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;wxPython-dev&quot; 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 />

--00000000000099927d0587388d3b--