On Wed, 13 Jul 2011 15:17:48 -0400, Lic. José M. Rodriguez Bacallao <jmr...@gmail.com> wrote: > in this example: > > class ITest(Interface): > id = Str() > > @implements(ITest) > class Test(Model): > > @ITest.id.getter > def id(self): > return 'getting id' > > @ITest.id.setter > def id(self, v): > print 'setting id' > > @observe('id') > def on_change(self, change): > print 'changing...' > > test = Test() > test.id = 'xxx' > print test.id > > in the case of properties, it is necessary to use the syntax: > @Interface.attr but here I got another problem, the getter are not > being called. Why?
@id.setter def id(self, v): Python properties work in exactly the same way. Phil _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt