2003-09-25 Seth Nickell <seth@gnome.org>
authorSeth Nickell <seth@gnome.org>
Thu, 25 Sep 2003 09:34:50 +0000 (09:34 +0000)
committerSeth Nickell <seth@gnome.org>
Thu, 25 Sep 2003 09:34:50 +0000 (09:34 +0000)
* python/examples/example-service.py:

Johan notices complete wrong code in example-service, but
completely wrong in a way that works exactly the same (!).
Johan is confused, how could this possibly work? Example
code fails to serve purpose of making things clear.
Seth fixes.

ChangeLog
python/examples/example-service.py

index 58702c2..6317ef5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2003-09-25  Seth Nickell  <seth@gnome.org>
+
+       * python/examples/example-service.py:
+
+       Johan notices complete wrong code in example-service, but
+       completely wrong in a way that works exactly the same (!).
+       Johan is confused, how could this possibly work? Example
+       code fails to serve purpose of making things clear.
+       Seth fixes.
+
 2003-09-25  Mark McLoughlin  <mark@skynet.ie>
 
        * doc/dbus-specification.sgml: don't require header fields
index 88f6b50..79fb009 100644 (file)
@@ -3,15 +3,16 @@ import dbus
 import pygtk
 import gtk
 
-class MyObject(dbus.Object):
-    def __init__(self):
-        service = dbus.Service("org.designfu.SampleService")
-        dbus.Object("/SomeObject", [self.HelloWorld], service)
+class SomeObject(dbus.Object):
+    def __init__(self, service):
+        dbus.Object.__init__(self, "/SomeObject", [self.HelloWorld], service)
 
     def HelloWorld(self, hello_message):
         print (hello_message)
         return "Hello from example-service.py"
 
-object = MyObject()
+
+service = dbus.Service("org.designfu.SampleService")
+object = SomeObject(service)
 
 gtk.main()