Opened 5 years ago

Closed 5 years ago

#18414 closed defect (worksforme)

StackContainer doesn't work in programmatic way

Reported by: alanland Owned by: bill
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.10.3
Keywords: Cc:
Blocked By: Blocking:

Description

I typed the example on reference guide, but it doesn't work in programmatic way.

I also found the test page /dijit/tests/layout/StackContainer.html doesn't work too, when create a stack container in programatic way.

require([
    "dijit/layout/StackContainer",
    "dijit/layout/ContentPane",
    "dijit/layout/StackController",
    "dojo/domReady!"
], function(StackContainer, ContentPane, StackController){
    var sc = new StackContainer({
        style: "height: 300px; width: 400px;",
        id: "myProgStackContainer"
    }, "scontainer-prog");

    var cp1 = new ContentPane({
        title: "page 1",
        content: "page 1 content"
    });
    sc.addChild(cp1);

    var cp2 = new ContentPane({
        title: "page 2",
        content: "page 2 content"
    });
    sc.addChild(cp2);

    var controller = new StackController({containerId: "myProgStackContainer"}, "scontroller-prog");

    sc.startup();
    controller.startup();
});

Attachments (2)

scprog.html (1009 bytes) - added by bill 5 years ago.
working test case
Screen Shot 2014-12-15 at 10.50.34 AM.gif (22.2 KB) - added by bill 5 years ago.
screenshot of reference guide (https://dojotoolkit.org/reference-guide/1.10/dijit/layout/StackContainer.html#dijit-layout-stackcontainer) programmatic example working for me

Download all attachments as: .zip

Change History (4)

comment:1 Changed 5 years ago by bill

Component: GeneralDijit
Owner: set to bill
Status: newassigned

Hmm, yes, something seems weird there. I'll take a look.

comment:2 Changed 5 years ago by bill

Resolution: worksforme
Status: assignedclosed

Actually it's working fine, including /dijit/tests/layout/StackContainer.html. I'll attach a working test case. The reference guide example works for me too, except for that problem that it switches into high-contrast mode. This is an issue with the documentation site rather than with dijit, and I think it's logged somewhere else.

Changed 5 years ago by bill

Attachment: scprog.html added

working test case

Note: See TracTickets for help on using tickets.