Re: Ideas to store add-on state.
James Scholes
If you have state that only needs to be utilised during the add-on's runtime, and not persisted, I would just store it on the AppModule or GlobalPlugin instance:
toggle quoted messageShow quoted text
class AppModule(appModuleHandler.AppModule): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._someStateFlag = False self._someOtherStateFlag = 14 # or self._state = {'flag1': False, 'flag2': 14} Is there a reason why this wouldn't be sufficient? Regards, James Scholes
On 21/06/2022 at 11:20, Pawel Urbanski wrote:
Dear Everyone,
|
|