-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return DBusObject instance when return type is Object Path #15
Comments
I'm not sure I understand what you mean. Would you mind explaining a bit further? |
Take this code as an example: FOO_INTERFACE = 'com.foo.Interface'
BAR_INTERFACE = 'com.foo.Bar'
class Bar(DBusObject):
iface = DBusInterface(BAR_INTERFACE, Method('FooBar')
dbusInterfaces = [iface]
@dbusMethod(BAR_INTERFACE, 'FooBar')
def FooBar(self):
print('foobar')
class FooInterface(DBusObject):
iface = DBusInterface(FOO_INTERFACE, Method('GetBar', returns='o'))
dbusInterfaces = [iface]
@dbusMethod(FOO_INTERFACE, 'GetBar')
def GetBar(self):
obj = FooBar()
self.getConnection().exportObject(obj)
return obj # <- Exception trying to call startswith, as it waits for a str type Actually the |
Ok, I think I follow you now. So you're saying that if the DBus interface I'll put this on the queue for the next txdbus release but, honestly, I Thanks for the suggestion Derek. Tom On Mon, Aug 25, 2014 at 9:55 AM, Derek Willian Stavis <
|
DBusObject
methods with object path return type doesn't allow returning aDBusObject
subclass. It would be very nice to support this, as subclasses ofDBusObject
are initialized with its path.The text was updated successfully, but these errors were encountered: