#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 )
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 Changed 14 years ago by
comment:2 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 14 years ago by
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 14 years ago by
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 14 years ago by
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 14 years ago by
Milestone: | → 0.4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Reporter verified it works fine in 0.4.3. Closing it out.
comment:8 Changed 12 years ago by
Milestone: | → 1.2 |
---|
marking tickets closed in the last three months w/blank milestone to milestone 1.2.
shit missed one }, i cannot edit my post..