Hey all,

Quick note for posterity:

When you're writing a module (aka: .js file) in Dojo, it's is
imperative that your define your packages BEFORE declaring your
dependencies.

The right way:

// what we're gonna give the world:
dojo.hostenv.startPackage("this.is.my.crappy.module");

// what we feel entitled to:
dojo.hostenv.loadModule("someones.brilliant.module");

The wrong way:

dojo.hostenv.loadModule("...");
dojo.hostenv.startPackage("my.class");


PS: if, like me, you dislike the names "loadModule" and
"startPackage", you can use the synonyms (defined as of 10 minutes
ago) "require" and "provide" in dojo.hostenv.

Regards

- --
Alex Russell
alex@dojotoolkit.org
alex@netWindows.org F687 1964 1EF6 453E 9BD0 5148 A15D 1D43 AB92 9A46

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdojo-contributors @
categoriesdojo
postedJan 7, '05 at 2:21p
activeJan 7, '05 at 2:21p
posts1
users1
websitedojotoolkit.org

1 user in discussion

Alex Russell: 1 post

People

Translate

site design / logo © 2021 Grokbase