Re: Re: WxImageButton on Linux
philippe DALET <[email protected]> Wed, 24 Apr 2019 23:49:36 +0200
| Newsgroups | gmane.comp.python.wxpython.devel |
|---|---|
| Message-ID | <CAPq9+MN5STbCz=6xkBRGHaoaY_yqF=C0qU53Cnk1tZQw58s1RA@mail.gmail.com> |
--00000000000034c51405874daed4
Content-Type: multipart/alternative; boundary="00000000000034c51105874daed2"
--00000000000034c51105874daed2
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Hi,
A very simple Pythoncard App to run on Windows or Ubuntu.
breakpoint: PythonCard\components\Imagebutton.py line57
call wx.BitmapButton.__init__
wheel:
https://www.dropbox.com/s/3k6duczem056znn/PythonCard-0.9.1-py3-none-any.whl=
?dl=3D0
Thanks a lot
Philippe.
Le mer. 24 avr. 2019 =C3=A0 17:14, philippe DALET <[email protected]=
> a
=C3=A9crit :
> Yes of course.
> I'll create a simple application.
>
> Sorry.
>
> Philippe
>
> Le mer. 24 avr. 2019 =C3=A0 00:22, Robin Dunn <[email protected]> a =C3=
=A9crit :
>
>> I'm not sure in what universe that 109,405 lines of Python code, plus
>> tons of data files, that uses matplotlib and scipy is considered a "smal=
l
>> 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
>>> 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.
>>>>>
>>>>> With python 3.7.2 on Windows seven, this bug was already present. No
>>>>> 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 wrot=
e:
>>>>>>>>
>>>>>>>> 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 linu=
x
>>>>>>>> ?
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 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 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 s=
ide of
>>>>>>> things.
>>>>>>>
>>>>>>> Ah, I just noticed something odd:
>>>>>>>
>>>>>>> > File
>>>>>>> "/usr/local/lib/python3.6/dist-packages/PythonCard/components/image=
button.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 so=
mething
>>>>>>> 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,
>>>>>> style)
>>>>>>
>>>>>>
>>>>>> --
>>>>>> 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.
>>>>
>>> --
>> You received this message because you are subscribed to the Google Group=
s
>> "wxPython-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n
>> 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.
--00000000000034c51105874daed2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr">Hi,<div><br></div><div>A=
very simple Pythoncard App to run on Windows or Ubuntu.</div><div>breakpoi=
nt: PythonCard\components\Imagebutton.py line57</div><div>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 call=C2=A0wx.BitmapButton.__i=
nit__</div><div>wheel:=C2=A0</div><div><a href=3D"https://www.dropbox.com/s=
/3k6duczem056znn/PythonCard-0.9.1-py3-none-any.whl?dl=3D0">https://www.drop=
box.com/s/3k6duczem056znn/PythonCard-0.9.1-py3-none-any.whl?dl=3D0</a></div=
><div><br></div><div>Thanks a lot</div><div>Philippe.</div></div></div></di=
v><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Le=
=C2=A0mer. 24 avr. 2019 =C3=A0=C2=A017:14, philippe DALET <<a href=3D"ma=
ilto:[email protected]">[email protected]</a>> a =C3=A9cri=
t=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 di=
r=3D"ltr">Yes of course.<div>I'll create a simple application.</div><di=
v><br></div><div>Sorry.</div><div><br></div><div>Philippe</div></div><br><d=
iv class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Le=C2=A0mer.=
24 avr. 2019 =C3=A0=C2=A000:22, Robin Dunn <<a href=3D"mailto:robin@all=
dunn.com" target=3D"_blank">[email protected]</a>> a =C3=A9crit=C2=A0:<b=
r></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">=
I'm not sure in what universe that=C2=A0109,405 lines of Python code, p=
lus tons of data files, that uses matplotlib and scipy is considered a &quo=
t;small stand-alone sample" but in this universe it isn't.<div><br=
></div><div>--</div><div>Robin</div><div><br><br>On Tuesday, April 23, 2019=
at 1:37:29 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);=
padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr">Robin<div><br></div><di=
v>Get this file=C2=A0</div><div><a href=3D"https://www.dropbox.com/s/0dbsnm=
krcfzgegx/avancement.tar.gz?dl=3D0" rel=3D"nofollow" target=3D"_blank">http=
s://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></di=
v><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]" rel=3D"nofollow" target=3D"_blank">robin@alld=
unn.com</a>> a =C3=A9crit=C2=A0:<br></div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,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:4=
8: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);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 come necessarily from wxpython.=
=C2=A0</div><div><br></div><div>With python 3.7.2 on Windows seven, this bu=
g 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 <<a href=3D"mailto=
:[email protected]" rel=3D"nofollow" target=3D"_blank">[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">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 dir=
=3D"ltr">On Friday, April 19, 2019 at 12:53:40 PM UTC-7, philippe DALET wro=
te:<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-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 wi=
ndows. It seems that it expects another parameter.=C2=A0</div><div><br></di=
v><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++ wrappe=
r code where that exception is raised is identical on each platform and it =
hasn't yet gotten to any platform-dependent wxWidgets code, it's ju=
st type-checking the parameters to=C2=A0 decide which wxBitmapButton constr=
uctor 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/dist-packages/PythonCard/com=
ponents/imagebutton.py", line 56, in __init__</div><div>>=C2=A0 =C2=
=A0 =C2=A0wx.BitmapButton.__init__(self, parent, id, self._bitmap.getBits()=
,pos, size, style, validator, name)</div><div>> TypeError: <b><font colo=
r=3D"#ff0000">Control():</font></b> arguments did not match any overloaded =
call:</div></div><div><br></div><div>Somehow it is not trying to call wx.Bi=
tmapButton.__init__ but wx.Control's __init__. Does PythonCard do any m=
onkey-patching or something that could be replacing wx.BitmapButton with wx=
.Control?</div></div></blockquote><div><br></div><div><br></div><div>For ex=
ample, I can duplicate the exception with code like this:</div><div><br></d=
iv><div><div><font face=3D"courier new, monospace">wx.BitmapButton =3D wx.C=
ontrol</font></div><div><font face=3D"courier new, monospace">class TestBut=
ton(wx.BitmapButton):</font></div><div><font face=3D"courier new, monospace=
">=C2=A0 =C2=A0 def __init__(self, parent, id, bmp, pos=3Dwx.DefaultPositio=
n, size=3Dwx.DefaultSize, style=3D0:</font></div><div><span style=3D"font-f=
amily:"courier new",monospace">=C2=A0 =C2=A0 =C2=A0 =C2=A0 wx.Bit=
mapButton.__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" 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" 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" 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>
</blockquote></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 />
--00000000000034c51105874daed2--
--00000000000034c51405874daed4
Content-Type: text/x-python; charset="US-ASCII"; name="test.rsrc.py"
Content-Disposition: attachment; filename="test.rsrc.py"
Content-Transfer-Encoding: base64
Content-ID: <f_juvqi0g10>
X-Attachment-Id: f_juvqi0g10
eydhcHBsaWNhdGlvbic6eyd0eXBlJzonQXBwbGljYXRpb24nLAogICAgICAgICAgJ25hbWUnOidU
ZW1wbGF0ZScsCiAgICAnYmFja2dyb3VuZHMnOiBbCiAgICB7J3R5cGUnOidCYWNrZ3JvdW5kJywK
ICAgICAgICAgICduYW1lJzonYmdUZW1wbGF0ZScsCiAgICAgICAgICAndGl0bGUnOidTdGFuZGFy
ZCBUZW1wbGF0ZSB3aXRoIG5vIG1lbnVzJywKICAgICAgICAgICdzaXplJzooNDAwLCAzMDApLAoK
ICAgICAgICAgJ2NvbXBvbmVudHMnOiBbCgp7J3R5cGUnOidJbWFnZUJ1dHRvbicsIAogICAgJ25h
bWUnOidJbWFnZUJ1dHRvbjEnLCAKICAgICdwb3NpdGlvbic6KDEwLCAxMCksIAogICAgJ2JvcmRl
cic6J3RyYW5zcGFyZW50JywgCiAgICAnZmlsZSc6Jy4vaW1hZ2VBLnBuZycsIAogICAgfSwKCl0g
IyBlbmQgY29tcG9uZW50cwp9ICMgZW5kIGJhY2tncm91bmQKXSAjIGVuZCBiYWNrZ3JvdW5kcwp9
IH0K
--00000000000034c51405874daed4
Content-Type: text/x-python; charset="US-ASCII"; name="test.py"
Content-Disposition: attachment; filename="test.py"
Content-Transfer-Encoding: base64
Content-ID: <f_juvqiaet1>
X-Attachment-Id: f_juvqiaet1
IyEvdXNyL2Jpbi9weXRob24zCgpmcm9tIFB5dGhvbkNhcmQgaW1wb3J0IG1vZGVsCgpjbGFzcyBN
eUJhY2tncm91bmQobW9kZWwuQmFja2dyb3VuZCk6CgogICAgZGVmIG9uX2luaXRpYWxpemUoc2Vs
ZiwgZXZlbnQpOgogICAgICAgICMgaWYgeW91IGhhdmUgYW55IGluaXRpYWxpemF0aW9uCiAgICAg
ICAgIyBpbmNsdWRpbmcgc2l6ZXIgc2V0dXAsIGRvIGl0IGhlcmUKICAgICAgICBwYXNzCgoKaWYg
X19uYW1lX18gPT0gJ19fbWFpbl9fJzoKICAgIGFwcCA9IG1vZGVsLkFwcGxpY2F0aW9uKE15QmFj
a2dyb3VuZCkKICAgIGFwcC5NYWluTG9vcCgpCg==
--00000000000034c51405874daed4
Content-Type: image/png; name="imageA.png"
Content-Disposition: attachment; filename="imageA.png"
Content-Transfer-Encoding: base64
Content-ID: <f_juvqjauh3>
X-Attachment-Id: f_juvqjauh3
iVBORw0KGgoAAAANSUhEUgAAAD4AAAATCAYAAADI876sAAAABHNCSVQICAgIfAhkiAAAApJJREFU
WIXt1luIlVUUB/CfookXRqVB8VKCZIoXVA5iD4XYS+pDgpIWEfjgi0GE+FQKjoOPEaJCDwmaiNJF
8pKXLPUzKMTyAopoXh406yHBSxbapPaw9jDfHM8cz3ycicD5w+bbe+2197fua9MNGVZXoG/ClhrO
D8NGXMNdXMHnGJLjGYvPcD3xnMY76FFQ5sLoVce7tuMeXsOvGIVX0T/tT8D3+Baz8Dtm4EOMx5I6
ytIpZIp7fBAeolSF5xCOetS7c9LZF2sRsl7oWad7/kxjrspR1IiZWCOUzGMvzmNBnWTpNDL8jTtl
o0VtOf4GbuMPHMT7GJH2pguFp3RwdqcwwH+Gco9/LITLj125/ZLI0+/Sd3pubxuG4038iEU4i8mK
Fa9G3MDiHG0qPihwVz98pYMIzzw+x4ehIc0n4liVn/XGGWwWSjwUUVEJ57G2jLZOGD2v+A48U+Wf
1bAC81oXnc3x30Q4E+3ofhXeFlwWVf06juBdlYvb86LNtWI8BuBEjtaAkbia1oPxNQ7jJ7wk9NmA
H/AJjuO5xL9bB4bP1F7VnxJtaXZaD8UBLExCj8FS/CNCHibhlujtJdHu3hJG+ajs/i/xLJq0eXwa
vsjx9EafNG9tlXOxNdEacVOb4n1FZKFYH+8l8vlT7Eu02ziF9zA60S7hbWE44rHyAprxjYiEC1iF
9bn7X8HP4gFUjny0DBTpMAIPhKHGCW8TBj1Xdra8o9SMnsKiy4peUAOWi+jbj4uiTrwsQv1kjm8p
Vqb5JPwiPN4anU9r7/HJItoK4XX8lQTLRBvqSjRpX9x2iRQhUuqUyPNmoXg+x7don+PLMb+L5e0y
lMQTt1ZkQvG+2KN+D7b/PTJtHu9GN7rxBOFfHmWSK40cBBEAAAAASUVORK5CYII=
--00000000000034c51405874daed4--