There are situations when I need to set class attributes from within an instance. One solution would be to create a class method that is called the instance method. That class method would be used to set the class attribute.
However, I would like to know if there is a way to define a property and its setter to edit a class attribute from within an instance method. In other words, I would like to have a class attribute that could be set from any instance while still remaining shared across instances.
Specifically, this is my use case: my instance needs to be destroyed and recreated. However, upon recreation, I need to access a class attribute that stores the reason why the previous instance has been destroyed to initialize the object properly.
Thank you