Re: Re: WxImageButton on Linux

philippe DALET <[email protected]> Fri, 19 Apr 2019 21:53:24 +0200
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <CAPq9+MNRQuoTkCQtkjbzBJFr5T3wkT0ukSZ51ckH1jK4EyXdiQ@mail.gmail.com>
--0000000000009500c30586e77993
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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 ?
Philippe.

Le ven. 19 avr. 2019 =C3=A0 20:25, Robin Dunn <[email protected]> a =C3=A9c=
rit :

> On Friday, April 19, 2019 at 5:53:12 AM UTC-7, philippe DALET wrote:
>>
>> Hello,
>>
>> I started to upgrade Pythoncard for python3.
>> All components work on linux (64 bits, Ubuntu 180.4 and 16.04, gtk2 or
>> gtk3, python 3.5 and 3.6 and 3.7)  except wxImageButton .
>> It works properly on windows seven.
>>
>>
>> Message:
>>
>> Traceback (most recent call last):
>>   File "/usr/local/lib/python3.6/dist-packages/PythonCard/model.py", lin=
e
>> 372, in OnInit
>>     self._initBackgrounds(self.resource)
>>   File "/usr/local/lib/python3.6/dist-packages/PythonCard/model.py", lin=
e
>> 365, in _initBackgrounds
>>     bg =3D self.frameClass(None, bgRsrc)
>>   File "/usr/local/lib/python3.6/dist-packages/PythonCard/model.py", lin=
e
>> 548, in __init__
>>     self._initLayout(aBgRsrc.components)
>>   File "/usr/local/lib/python3.6/dist-packages/PythonCard/model.py", lin=
e
>> 801, in _initLayout
>>     self.components[rsrc.name] =3D rsrc
>>   File "/usr/local/lib/python3.6/dist-packages/PythonCard/model.py", lin=
e
>> 73, in __setitem__
>>     control =3D component.ComponentFactory().createComponent(self.parent=
,
>> self.parent.panel, item)
>>   File "/usr/local/lib/python3.6/dist-packages/PythonCard/component.py",
>> line 340, in createComponent
>>     component =3D clazz(aParent, aResource)
>>   File
>> "/usr/local/lib/python3.6/dist-packages/PythonCard/components/imagebutto=
n.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:
>>   overload 1: argument 3 has unexpected type 'Bitmap'
>>   overload 2: too many arguments
>> OnInit returned false, exiting...
>> Segmentation fault (core dumped)
>> Pause ...
>>
>>
>> The third parameters is not good: 'Bitmap'.
>>
>
>
> Are you sure that self._bitmap.getBits() is returning a wx.Bitmap and not
> some other Bitmap class? (Such as PC's graphic.Bitmap.)
>
> --
> 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.
>

--=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.

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

<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 in C=
 with an IDE on linux ?</div><div>Philippe.</div></div><br><div class=3D"gm=
ail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Le=C2=A0ven. 19 avr. 2019 =
=C3=A0=C2=A020:25, 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">On Friday, April 19, 2019 at 5:5=
3:12 AM 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">Hello,<div><br></div><div>I started to upgrade =
Pythoncard for python3.</div><div>All components work on linux (64 bits, Ub=
untu 180.4 and 16.04, gtk2 or gtk3, python 3.5 and 3.6 and 3.7)=C2=A0 excep=
t wxImageButton=C2=A0.</div><div>It works properly on windows seven.</div><=
div><br></div><div><br></div><div>Message:</div><div><br></div><div><div>Tr=
aceback (most recent call last):</div><div>=C2=A0 File &quot;/usr/local/lib=
/python3.6/dist-packages/PythonCard/model.py&quot;, line 372, in OnInit</di=
v><div>=C2=A0 =C2=A0 self._initBackgrounds(self.resource)</div><div>=C2=A0 =
File &quot;/usr/local/lib/python3.6/dist-packages/PythonCard/model.py&quot;=
, line 365, in _initBackgrounds</div><div>=C2=A0 =C2=A0 bg =3D self.frameCl=
ass(None, bgRsrc)</div><div>=C2=A0 File &quot;/usr/local/lib/python3.6/dist=
-packages/PythonCard/model.py&quot;, line 548, in __init__</div><div>=C2=A0=
 =C2=A0 self._initLayout(aBgRsrc.components)</div><div>=C2=A0 File &quot;/u=
sr/local/lib/python3.6/dist-packages/PythonCard/model.py&quot;, line 801, i=
n _initLayout</div><div>=C2=A0 =C2=A0 self.components[<a href=3D"http://rsr=
c.name" rel=3D"nofollow" target=3D"_blank">rsrc.name</a>] =3D rsrc</div><di=
v>=C2=A0 File &quot;/usr/local/lib/python3.6/dist-packages/PythonCard/model=
.py&quot;, line 73, in __setitem__</div><div>=C2=A0 =C2=A0 control =3D comp=
onent.ComponentFactory().createComponent(self.parent, self.parent.panel, it=
em)</div><div>=C2=A0 File &quot;/usr/local/lib/python3.6/dist-packages/Pyth=
onCard/component.py&quot;, line 340, in createComponent</div><div>=C2=A0 =
=C2=A0 component =3D clazz(aParent, aResource)</div><div>=C2=A0 File &quot;=
/usr/local/lib/python3.6/dist-packages/PythonCard/components/imagebutton.py=
&quot;, line 56, in __init__</div><div>=C2=A0 =C2=A0 wx.BitmapButton.__init=
__(self, parent, id, self._bitmap.getBits(),pos, size, style, validator, na=
me)</div><div>TypeError: Control(): arguments did not match any overloaded =
call:</div><div>=C2=A0 overload 1: argument 3 has unexpected type &#39;Bitm=
ap&#39;</div><div>=C2=A0 overload 2: too many arguments</div><div>OnInit re=
turned false, exiting...</div><div>Segmentation fault (core dumped)</div><d=
iv>Pause ...=C2=A0</div></div><div><br></div><div><br></div><div>The third =
parameters is not good: &#39;Bitmap&#39;.</div></div></blockquote><div><br>=
</div><div><br></div><div>Are you sure that self._bitmap.getBits() is retur=
ning a wx.Bitmap and not some other Bitmap class? (Such as PC&#39;s graphic=
.Bitmap.)</div><div><br></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]" 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 />

--0000000000009500c30586e77993--