I noticed yesterday myself that the documentation for system.perspective.alterDock is wrong for the display settings. I was making a lock/unlock feature for a dock with similar logic to @deon.korb’s script. See the end of this post:
system.perspective.alterDock