Perspective closeDock closes all docks regardless of DockID

I have tried this out in 8.0.12 and a recent 8.0.14 nightly, but if I have two north docked views, and I give one the ability to open and close itself, it will close the other dock as well.

One dock is given the DockID “GeneralHeader” and the other “SysAlarmHeader”. The view configured for SysAlarmHeader has a property on the root container that checks a boolean tag, the property has a script transform on it with the following:

if value:
return value

Here is the screen beforehand (the Keith and Icons are part of the GeneralHeader)

Here is the screen when the value is true (The GeneralHeader is lost, with any combination of Scrollable/Fixed use for the anchor property on both, but I would presume this is a bug to unless I have it configured wrong)

Here is when the value becomes true afterwards while the SysAlarmHeader is Fixed:

Here is when the value becomes true afterwards while the SysAlarmHeader is Scrollable:

Here is what happens if I navigate to any page, the GeneralHeader comes back, and the SysAlarmHeader leaves no matter its previous state.

The end goal here is for this header to only be visible when my boolean is True, if there is a way to bind that then I am sure that would be a better solution, just not really able to find how to do that either.

EDIT: If I change my binding to an expression for now(5000) and poll, then check the tag within a script transform, and move the dock south then it is a temporary workaround for now. Just does not look as good, and feels less efficient.

Can’t help you in your question sorry, but you’re missing “may” in your warning, in case you haven’t picked it up already :slight_smile: Looks like a nice looking project as well

Lol good eye, good thing this is still in dev, I definitely didn’t notice that.

Also thanks! Once complete I may strip some logos and put it on the “Show your project” page.

When you’re opening or closing a Docked View, you’re performing an action on the PAGE; this is why when you navigate to a different page, the “default” header is displayed, and not the alarm header. An easy way to tell is that openDock and closeDock accept pageId arguments.

You can also only have one Docked View expanded per side at any given time. So if you have two assigned to North, and one is open, but you expand (open) the second, the first one collapses out of view.

What you should probably do is place the open/close Dock scripting in the View startUp Event of the General Docked View, in addition to wherever else you’re checking. This would force the GeneralHeader to determine if it should collapse itself and display the SysAlarmHeader Docked View instead.

So would this mean that if I need to keep both headers functionality at the same time, the appropriate way to do this is to nest the General Header inside the Alarm header, and make the alarm header a combination of both? That way when the alarm header pops up, you see “both”? Then instead of “closing” the Alarm header I just instead open the General Header?

Update, the aforementioned option works. However this is still a bug if I have the docked window set to Scrollable:


Hmm, I read this again, and I reckon I had this same issue. I had a top header docked and I wanted to have another top dock to slide into view that said something like ‘action successful’ when the user performed certain actions (as you see in other apps). But I reckon I ran into this issue you’re describing. I ended up moving it to dock at the bottom instead, but if I had a bottom dock already, I would have been a bit stuffed! It was only for one of the ignition certifications, and it wasn’t asked for, so it didnt really matter, but it’s certainly something that I would want to do again for a real project

1 Like