Exemple #1
0
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)
Exemple #2
0
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)