Thanks Danielle.<br><br>
"Basically, whatever interface a method, or signal comes from, you pass<br>
that as the key to the object." - Is this a dbus-python feature? <br>-A<br><br><div class="gmail_quote">On Sun, Jan 17, 2010 at 5:40 PM, Danielle Madeley <span dir="ltr"><<a href="mailto:danielle.madeley@collabora.co.uk">danielle.madeley@collabora.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Sun, 2010-01-17 at 16:00 -0800, Anand CVR wrote:<br>
> Question: Is cm an array or just one ConnectionManager object? The<br>
> syntax cm[CONNECTION_MANAGER] seems to suggest that it is an array.<br>
> But the GetManager() method seems to return just a ConnectionManager<br>
> object.<br>
<br>
</div>cm is an object, but since D-Bus objects implement multiple interfaces<br>
we use the dictionary-style, getattr syntax to be able to specify which<br>
D-Bus interface we are making the method call on (this syntax is also<br>
used in Python for dictionary keys, which is a little more synonymous<br>
with what's going on here).<br>
<br>
This probably could be explain a little better in the book (it currently<br>
gets one sentence):<br>
<a href="http://people.collabora.co.uk/%7Edanni/telepathy-book/sect.basics.language-bindings.html#sect.basics.dbus.language-bindings.python" target="_blank">http://people.collabora.co.uk/~danni/telepathy-book/sect.basics.language-bindings.html#sect.basics.dbus.language-bindings.python</a><br>
<br>
Basically, whatever interface a method, or signal comes from, you pass<br>
that as the key to the object.<br>
<br>
Hope this clears things up.<br>
<br>
--d<br>
<font color="#888888"><br>
--<br>
Danielle Madeley<br>
Software Developer, Collabora Ltd. Melbourne, Australia<br>
<br>
<a href="http://www.collabora.co.uk" target="_blank">www.collabora.co.uk</a><br>
<br>
</font></blockquote></div><br>