Contents Disappear

I have an odd situation where I have a window:

isc.Window.create({
    autoDraw: false,
    ID: "ShowAdminAssetListShareWindow",
    title: "Share Files",
    width: 980, height: 600,
    showHeaderIcon: false,
    showResizer: true,
    showFooter: false,
    keepInParentRect: true,
    showMinimizeButton: false,
    showMaximizeButton: false,
    showCloseButton: true,
    canDragReposition: true,
    showModalMask: true,
    modalMaskOpacity: 20,
    dismissOnEscape: true,
    isModal: true,
    autoCenter: true,
    showEdges: true,
    items: [
            isc.ViewLoader.create({
                autoDraw: false,
                width: "100%", height: "100%",
                viewURL: "ShowAdminShareAssets.js",
                loadingMessage: "Loading Application..."
            })
    ]

        });

I open it with: ShowAdminAssetListShareWindow.show();

After an action is performed in the window it’s closed with:

ShowAdminAssetListShareWindow.hide();

Later, if I call ShowAdminAssetListShareWindow.show(); again, the window opens but it’s empty, just a white window background.

I’m not really sure where to start debugging this, any suggestions?

Paul

For any such issues (“where’s my component?”) start with the Watch Tab in the Developer Console. The question is, what’s in the Window and is it what you expected? If not, use the Watch Tab to track down where the components are that you expected to find in the Window, and use log categories like “destroys” and “clears” to figure out if those components were somehow wiped out.

Thanks for the advice.

There is nothing being called to destroy or clear the contents. I tried doing a “markForRedraw()” call before the “show()” and it looks like its fixed the issue. My only concern is the possible extra time added to the app to redraw these windows every time they are shown.

Paul

Hmm, that’s a very odd fix, because markForRedraw() does effectively nothing for a component that has children, as the ViewLoader does. If you’re able to put together a test case that’d be great.