#13278 closed defect (fixed)
Wrong define in dojox/timing/_base.js
Reported by: | Marc Durocher | Owned by: | Adam Peller |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Dojox | Version: | 1.7.0b1 |
Keywords: | ttrenka | Cc: | |
Blocked By: | Blocking: |
Description
dojox/timing/_base.js starts with
define(dojo/_base/lang?, function(dojo){
dojo.experimental("dojox.timing");
-> dojo.experimental is not a function
the file should start with
define(dojo/_base/kernel?, function(dojo){
dojo.experimental("dojox.timing");
Change History (6)
comment:1 Changed 11 years ago by
Keywords: | ttrenka added |
---|---|
Milestone: | tbd → 1.7 |
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 11 years ago by
comment:5 Changed 11 years ago by
thanks, I was going to ask about this... does that mean best practice is to treat _base modules like separate modules and not use the dojo.* global namespace? e.g. have two different function args for kernel and lang and use them separately in place of dojo.*
comment:6 Changed 11 years ago by
there's a few ways to approach this.
- use "dojo" as a dep and then you get all of base. this is the equivalent of previously including dojo.js
- use "dojo/_base/kernel" as your handle to dojo.* and add other _base deps as needed but only ever use the return value from kernel as your handle to dojo.* - effectively, you're using the other _base deps to extend the kernel and ignoring their return values.
- explicitly use the return value from each _base module as lang, declare, or whatever makes sense to you, as args in your factory function.
as i understand it, in the long term (ie for 2.0) the plan is to no longer have each of the base modules extend kernel. this would eliminate the 2nd option above. unless i'm just going to pull in all of base (the 1st option above) my personal preference is to do as you suggest (the 3rd option above) - have explicit args for each module and use them appropriately in place of dojo.* references.
lang already pulls in kernel, and lang is needed here, too. I see the experimental error either way.