#10175 closed defect (invalid)
StackContainer doesn't startup when using a build
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 )
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:
- Create a build that contains a StackContainer?-based widget (I hit this first in dojox.widget.Wizard)
- 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 (6)
comment:1 Changed 11 years ago by
Component: | General → BuildSystem |
---|---|
Description: | modified (diff) |
Owner: | changed from anonymous to James Burke |
comment:2 Changed 11 years ago by
PS: test_TabContainer.html is also working fine for me (again on FF3.5/mac).
comment:3 Changed 11 years ago by
Ok, my mistake. It turns out there was an old build file of plugd that was conflicting with the NodeList?.map function. Still not sure exactly what the problem is, but removing this file from the environment made the problem disappear.
Bug can be closed--external problem. Sorry for the noise!
Cheers, John
comment:4 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:5 Changed 11 years ago by
John - is there a bug present in plugd still here? Have you updated to plugd trunk?
comment:6 Changed 11 years ago by
I don't think so... this was a project started by someone else, and it looks like a built version of plugd was getting loaded, but it wasn't built with the rest of Dojo. Result: conflict. Turns out we weren't using it anyway.
This is working for me. I did a:
And then I modified test_Button.html to have the first two requires as:
dijit-all.js contains StackContainer as you instructed.
Then from the Firebug console (FF3.5/mac) I do:
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.