Opened 10 years ago

Last modified 10 years ago

#10175 closed defect

StackContainer doesn't startup when using a build — at Version 1

Reported by: John Locke Owned by: James Burke
Priority: high Milestone: tbd
Component: BuildSystem Version: 1.4.0b
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Hi,

Hit a really strange issue, when upgrading to 1.4.0b1 and also trunk, when using a Dojo build with dojox.layout.Wizard. I traced the problem up to NodeList?.map, but don't see what the problem is.

To reproduce:

  1. Create a build that contains a StackContainer?-based widget (I hit this first in dojox.widget.Wizard)
  2. Add it to a page using markup

Result: fatal javascript error in dojo.addClass, "node" is null.

Reason: dijit._Container.getChildren calls dojo.query().map(), and the result is a collection of domNodes instead of widgets.

Through testing on Firebug, you can see the problem:

x = new dojo.NodeList;
x.push(1,2,3,4,5);
x.map(function(i){return i+1;})

... expected result, and what you get if you have regular, un-built dojo loaded: [2,3,4,5,6]

... result when you have a build: [1,2,3,4,5]

Note that dojo.map works correctly--NodeList?.map has the issue.

Change History (1)

comment:1 Changed 10 years ago by bill

Component: GeneralBuildSystem
Description: modified (diff)
Owner: changed from anonymous to James Burke

This is working for me. I did a:

./build.sh profile=demos-all action=release

And then I modified test_Button.html to have the first two requires as:

dojo.require("dijit.dijit"); // optimize: load dijit layer
dojo.require("dijit.dijit-all"); 

dijit-all.js contains StackContainer as you instructed.

Then from the Firebug console (FF3.5/mac) I do:

x = new dojo.NodeList;
x.push(1,2,3,4,5);
x.map(function(i){return i+1;})

It's returning 2,3,4,5,6 for me as expected.

Does that work for you? Maybe you have something weird in your build... you need to provide an exact profile of a build and test file which reproduce the problem.

Note: See TracTickets for help on using tickets.