system.perspective.alterDock Params

Hi,

I have a dock that usually hides (display = onDemand), and want to programmatically change it to visible under certain conditions.

The docs are in conflict with the GUI, where the display options relate to the content options. See below:

  • display: The display state of the dock. Accepted values are:

    • push

    • cover

    • auto

I tried this, without success (also no exception):

		if show:			
			config = {"display":"visible"}
		else:
			config = {"display":"onDemand"}
		system.perspective.alterDock('dockWest', config)

Can someone please point me in the right direction?

8.1.50 for reference.

Regards,

Deon

Hi,

Whilst I do agree this is weird, especially on the different options for display, why don’t you simply use system.perspective.closeDock and system.perspective.openDock ?

system.perspective.toggleDock also exists in case you do not keep track of the state of the dock.

Unless obviously you want to change more parameters, but this is also doable using the functions I mentioned above.

I don’t simply want to open it. I want to ensure it remains open until auto is an option again. Closing and opening is not a suitable option.

The options for display are the push/cover/auto. Unless it's missing from the documentation I don't know if you can change ondemand to visible during runtime.