SlotSet in custom action other than run()

Is it possible to use SlotSet outside run()? With me SlotSet only works if it is under run(). Is this how it is meant to be? I can’t find any documentation about this.

I’ve worked it out.