[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: QML, Python, Signals, and Slots Part 2
From:       Eric Mesa <ericsbinaryworld () gmail ! com>
Date:       2012-06-25 13:01:35
Message-ID: CAKYHq8JH4SMBtROj+DpiPQb0MbGT+1=WzywAVAY6pWKg4i-74g () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Mon, Jun 25, 2012 at 1:35 AM, Luca Beltrame <einar@heavensinferno.net>wr=
ote:

> In data luned=EC 25 giugno 2012 07:51:21, Viranch Mehta ha scritto:
>
> > 1. sender.signal.connect(receiver.slot)
>
> I would recommend this way of connecting signals in, since errors will be
> immediately caught (AttributeError in case of wrong / missing signal)
> rather
> than silently ignored.
>
> The only case in which option 2 should be used is if the C++ signal has n=
ot
> been bound to the Python bindings.
>
> --
> Luca Beltrame - KDE Forums team
> KDE Science supporter
> GPG key ID: 6E1A4E79
>
> It also has the benefit of being a lot clearer to understand.  Once
Viranch pointed out where sender and receiver go, I was able to start to
figure things out and am extremely close to finally finishing this project.
--
Eric Mesa
http://about.me/ericmesa
http://www.ericsbinaryworld.com

[Attachment #5 (text/html)]

<div class="gmail_quote">On Mon, Jun 25, 2012 at 1:35 AM, Luca Beltrame <span \
dir="ltr">&lt;<a href="mailto:einar@heavensinferno.net" \
target="_blank">einar@heavensinferno.net</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> In data luned́ 25 giugno 2012 07:51:21, Viranch Mehta ha \
scritto:<br> <br>
&gt; 1. sender.signal.connect(receiver.slot)<br>
<br>
I would recommend this way of connecting signals in, since errors will be<br>
immediately caught (AttributeError in case of wrong / missing signal) rather<br>
than silently ignored.<br>
<br>
The only case in which option 2 should be used is if the C++ signal has not<br>
been bound to the Python bindings.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Luca Beltrame - KDE Forums team<br>
KDE Science supporter<br>
GPG key ID: 6E1A4E79<br>
</font></span><br></blockquote></div>It also has the benefit of being a lot clearer \
to understand.  Once Viranch pointed out where sender and receiver go, I was able to \
start to figure things out and am extremely close to finally finishing this \
                project.<br clear="all">
--<br>Eric Mesa<div><a href="http://about.me/ericmesa" \
target="_blank">http://about.me/ericmesa</a><br><a \
href="http://www.ericsbinaryworld.com/" \
target="_blank">http://www.ericsbinaryworld.com</a></div>



_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic