Re: Missing GObject.connect function in typelib, but present in gir

Marko Tasic <[email protected]> Fri, 25 Mar 2011 14:10:55 +0100
Newsgroups gmane.comp.gnome.language-bindings
Message-ID <[email protected]>
--===============0634344252==
Content-Type: multipart/alternative; boundary=0016364ed9d42991e0049f4e54d0

--0016364ed9d42991e0049f4e54d0
Content-Type: text/plain; charset=UTF-8

Rotty,

I took look at sbank, and I think it's more advance at this point than
pygir-ctypes.
Good job! However, I did it this way:

* created new struct that extended GClosure called PyClosure
* added notifiers for finalize and invalidate
* instantiated PyClosure
* connected with "hid = GObject.signal_connect_closure(window, 'destroy',
closure, False)"
* runned

But, it fails with "Segmentation fault" on window close.

Can you explain how you did this?

Regards,
Marko Tasic


On Fri, Mar 25, 2011 at 12:01 AM, Andreas Rottmann <[email protected]>wrote:

> Marko Tasic <[email protected]> writes:
>
> > Hi,
> >
> > I've started new project called pygir-ctypes. It's pure python binding
> > of girepository. Initial results are promising. pygir-ctypes parses all
> > GI*Info structs, and dynamically produces python classes, methods,
> > functions, etc. Have in mind that pygir-ctypes isn't trying to be
> compatible
> > with pygtk nor pyobject.
> >
> Funny thing, I did exactly the same for Scheme -- you might be
> interested in the code: <http://rotty.yi.org/software/sbank/>.
>
> Regards, Rotty
> --
> Andreas Rottmann -- <http://rotty.yi.org/>
>

--0016364ed9d42991e0049f4e54d0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div>Rotty,</div><div><br></div>I took look at sbank, and I think it&#39;s =
more advance at this point than pygir-ctypes.<div>Good job! However, I did =
it this way:</div><div><br></div><div>* created new struct that extended GC=
losure called PyClosure</div>

<div>* added notifiers for finalize and invalidate</div><div>*=C2=A0instant=
iated=C2=A0PyClosure</div><div>* connected with=C2=A0&quot;hid =3D GObject.=
signal_connect_closure(window, &#39;destroy&#39;, closure, False)&quot;</di=
v><div>* runned</div>

<div><br></div><div>But, it fails with &quot;Segmentation fault&quot; on wi=
ndow close.</div><div><br></div><div>Can you explain how you did this?<br><=
div><br></div><div>Regards,<br clear=3D"all">Marko Tasic<br>
<br><br><div class=3D"gmail_quote">On Fri, Mar 25, 2011 at 12:01 AM, Andrea=
s Rottmann <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]">a.rot=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class=3D"im">Marko Tasic &lt;<a href=3D"mailto:[email protected]">mta=
[email protected]</a>&gt; writes:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;ve started new project called pygir-ctypes. It&#39;s pure python=
 binding<br>
&gt; of girepository. Initial results are promising. pygir-ctypes parses al=
l<br>
&gt; GI*Info structs, and dynamically produces python classes, methods,<br>
&gt; functions, etc. Have in mind that pygir-ctypes isn&#39;t trying to be =
compatible<br>
&gt; with pygtk nor pyobject.<br>
&gt;<br>
</div>Funny thing, I did exactly the same for Scheme -- you might be<br>
interested in the code: &lt;<a href=3D"http://rotty.yi.org/software/sbank/"=
 target=3D"_blank">http://rotty.yi.org/software/sbank/</a>&gt;.<br>
<br>
Regards, Rotty<br>
<font color=3D"#888888">--<br>
Andreas Rottmann -- &lt;<a href=3D"http://rotty.yi.org/" target=3D"_blank">=
http://rotty.yi.org/</a>&gt;<br>
</font></blockquote></div><br></div></div>

--0016364ed9d42991e0049f4e54d0--

--===============0634344252==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
language-bindings mailing list  [email protected]
http://mail.gnome.org/mailman/listinfo/language-bindings

--===============0634344252==--