when my script locks an object using self.setLock(true), the UI toggle remains unchecked although indeed the object is locked. I can unlock the object by first setting and then clearing the toggle. Obviously minor, but if you are in the relevant code, would be nice to fix it.
It is working fine after all. I don't understand how I saw otherwise.