Ejemplo n.º 1
0
    async def __cbRemoveObjectDynProperty(self, name, prop):

        try:
            obj = self.onlineDoc.document.getObject(name)
            if obj is None:
                self.logger.error(
                    f"Object ({name}): Should remove dyn property {prop} for not existing object"
                )
                return

            self.logger.debug(
                f"Object ({name}): Remove dynamic property {prop}")
            Object.removeDynamicProperty(obj, prop)

        except Exception as e:
            self.logger.error(f"Dyn property removing failed: {e.message}")
Ejemplo n.º 2
0
    async def __cbRemoveViewProviderDynProperty(self, name, prop):

        try:
            obj = self.onlineDoc.document.getObject(name)
            if obj is None:
                self.logger.error(
                    f"ViewProvider ({name}): Should remove dynamic property {prop} for not existing viewprovider"
                )
                return

            self.logger.debug(
                f"ViewProvider ({name}): Remove dynamic property {prop}")
            Object.removeDynamicProperty(obj.ViewObject, prop)

        except Exception as e:
            self.logger.error(
                f"Dynamic property removing callback failed: {e.message}")