def readonly_getter(getterName): def getter(self): return getattr(self.reference, getterName)() methodName = getterName getter.__name__ = methodName annotate.injectAttribute("readonly_proxy_getter", methodName, getter) annotate.injectClassCallback("readonly_proxy_getter", "_makeRemote", methodName)
def readonly_store_property(propertyName): def getter(self): return getattr(self.reference.store, propertyName) methodName = "get" + propertyName[0].upper() + propertyName[1:] getter.__name__ = methodName annotate.injectAttribute("readonly_store_property", methodName, getter) annotate.injectClassCallback("readonly_store_property", "_makeRemote", methodName)