Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#3675 closed defect (fixed)

dojo.require in own packages do not work

Reported by: guest Owned by: alex
Priority: high Milestone: 1.2
Component: Loader Version: 0.3.1
Keywords: version (4898) Cc:
Blocked by: Blocking:

Description (last modified by peller)

I have written my own javascript code and like to use the dojo packaging mechanism using dojo.require and dojo.provide.

But i have a strange problem.

Here is my code:

 dojo.setModulePrefix("xdatasystem", "../xdatasystem");
 // loads the standard.js resource wich defines the includeLibs function
 dojo.require("xdatasystem.standard");
 dojo.addOnLoad(includeLibs);

Part of standard.js:

dojo.provide("xdatasystem.standard");

dojo.require("dojo.widget.Dialog");
dojo.require("dojo.html");
dojo.require("dojo.lfx.html");
dojo.require("dojo.widget.Editor2");

... more code ..

function includeLibs() {

		dojo.require("xdatasystem.actionrequest");
		dojo.require("xdatasystem.form");
		dojo.require("xdatasystem.validators");
		
}

Teh first lines of validators.js:

dojo.provide("xdatasystem.validators");

dojo.require("dojo.dom");
dojo.require("dojo.regexp");

... more code here...

Dojo is included using the normal <script element.

I get the following exception:

'''dojo.require is not a function'''
dj_eval(undefined)bootstrap1.js (line 266)
loadUri("/XDataSystem/standard/js/dojo/src/io/IframeIO.js", undefined)loader.js (line 114)
loadUriAndCheck("/XDataSystem/standard/js/dojo/src/io/IframeIO.js", "dojo.io.IframeIO", undefined)loader.js (line 125)
loadPath("src/io/IframeIO.js", "dojo.io.IframeIO", undefined)loader.js (line 88)
loadModule("dojo.io.IframeIO", undefined, undefined)loader.js (line 298)
require()loader.js (line 417)
dj_eval(undefined)bootstrap1.js (line 266)
loadUri("/XDataSystem/standard/js/dojo/../xdatasystem/actionrequest.js", undefined)loader.js (line 114)
loadUriAndCheck("/XDataSystem/standard/js/dojo/../xdatasystem/actionrequest.js", "xdatasystem.actionrequest", undefined)loader.js (line 125)
loadPath("../xdatasystem/actionrequest.js", "xdatasystem.actionrequest", undefined)loader.js (line 88)
loadModule("xdatasystem.actionrequest", undefined, undefined)loader.js (line 298)
require()loader.js (line 417)
includeLibs()bootstrap1.js (line 341)
loaded()loader.js (line 142)
callLoaded()loader.js (line 211)
modulesLoaded()loader.js (line 203)
(no name)()hostenv_browser.j... (line 293)
dj_addNodeEvtHdlr()hostenv_browser.j... (line 253)
[Break on this error] }

Very strange error. I think it has something to do with bug #744 http://trac.dojotoolkit.org/ticket/744:

Note that i am bound to version 0.3.1. because else the editor does not work,
and some other stuff..

Change History (8)

comment:1 in reply to: ↑ description Changed 7 years ago by guest

shit missed one },
i cannot edit my post..

comment:2 Changed 7 years ago by peller

  • Description modified (diff)

comment:3 Changed 7 years ago by guest

ps, im stil using the guest account.

How can i create my own account (there is no sign-up link, at least i did not found it)

comment:4 Changed 7 years ago by peller

accounts are typically reserved for committers, but I think they may be available on request. Sorry guest access is still awkward. Most of the ACLs are in place merely to prevent spamming. You might want to put your e-mail address in the reporter field so you can get automatically notified on updates. I'm not sure how far we can go to support 0.3.1, and you might as well skip 0.4 at this point. What do we need to fix to get you on 0.9? Are there tickets for that?

comment:5 Changed 7 years ago by guest

Ok i checked with the new 0.4.3 build and it gives no problems...

Thus this is not a bug anymore

comment:6 Changed 7 years ago by jburke

  • Milestone set to 0.4
  • Resolution set to fixed
  • Status changed from new to closed

Reporter verified it works fine in 0.4.3. Closing it out.

comment:7 Changed 6 years ago by anonymous

  • Milestone 0.4 deleted

Milestone 0.4 deleted

comment:8 Changed 6 years ago by bill

  • Milestone set to 1.2

marking tickets closed in the last three months w/blank milestone to milestone 1.2.

Note: See TracTickets for help on using tickets.