Dojo core
Dojo Loader
No more .* module resource syntax support
Mapping a .* resource name to __package__.js is no longer supported. It was too much "magic", and caused confusion with the Java notion of .* in package names. So things like dojo.require("foo.*") mapping to foo/__package__.js is no longer supported. Instead, use one of the following conventions:
- Use "common": For instance, dojo.require("foo.common") mapping to foo/common.js.
- Use a "private" directory: Have a "foo.bar" that maps to foo/bar.js, which in turn loads modules from a "private" directory named foo/_bar. Examples of this convention can be found in dojox: dojox.gfx, dojox.cometd, and dojox.sql.
dojo.query() changes
Several non-standard attribute and pseudo selectors were implemented (but never documented) in Dojo 0.9. These have been removed. If your code used the "!=" attribute value test, you can now use the :not() pseudo selector to achieve the same affect (including chains of not clauses). The non-standard ":contains" pseudo selector has also been removed.
DnD
File capitalization changes
Following files were capitalized to reflect that they host classes rather than collection of functions:
avatar.js ⇒ Avatar.js
container.js ⇒ Container.js
manager.js ⇒ Manager.js
selector.js ⇒ Selector.js
source.js ⇒ Source.js
Please rename your require statements like this:
dojo.require("dojo.dnd.source"); ⇒ dojo.require("dojo.dnd.Source");
move.js changes
Additionally move.js was split into 3 files: move.js, Mover.js, Moveable.js. This change needs no actions on your part, because move.js includes the other two files, but if you need just a single class, now you can include it directly.
New events
Moveable implements three events:
- onMove, which implements the move itself
- onMoving, which is called before onMove, so you have a chance to change something, for example, the new position of the move to implement some restrictions.
- onMoved, which is called after the move, so you can update other objects after the move.
As always look into the source and test files to see implementation details and suggested use scenarios.
Events have better locality than topics: instead of getting called on every move and check if it is "the right" move, you can connect directly to events on the Moveable. Nevertheless topics are still supported.
- Printer-friendly version
- Login or register to post comments
- Unsubscribe post
