Opened 8 years ago

Closed 8 years ago

#12374 closed defect (invalid)

dojo.string.substitute does not work.

Reported by: fossolution Owned by: anonymous
Priority: high Milestone: tbd
Component: General Version: 1.5
Keywords: dojo.string.substitute Cc:
Blocked By: Blocking:

Description

When I put the dojo.require("dojo.string") statement after dojo.require("dojo.forEach"), the substitute functions does not work.

Following example does not work

dojo.require("dojo.forEach");
dojo.require("dojo.string");

console.log(dojo.string.substitute("${0},${1}",["foo","bar"]);

However, If change the order of require then it work

dojo.require("dojo.string");
dojo.require("dojo.forEach");

console.log(dojo.string.substitute("${0},${1}",["foo","bar"]);

Change History (1)

comment:1 Changed 8 years ago by dante

Resolution: invalid
Status: newclosed

there is no dojo/forEach.js module, so issuing a dojo.require("dojo.forEach") is throwing an error.

http://jsfiddle.net/NED4e/ shows it working. Adding a dojo.require("dojo.forEach") makes an eventual error "Unable to Load dojo.forEach, last tried ../dojo/forEach.js"

also you must use dojo.ready/dojo.addOnLoad to use functionality pulled in by dojo.require()

Note: See TracTickets for help on using tickets.