Today I got pretty far along in using the dojo requires/provides
mechanism. I was going to check some things in but then I tried in IE
and nothing works. Dojo loads content dynamically using eval() on the
results and this works a bit differently in IE than Mozilla. For
example:


function LogFactory(){}
vs.
LogFactory = function(){}

When you eval() the second one you can use LogFactory later. When you
eval the first one a call to LogFactory later gives you symbol
undefined. The google code also has some issues with eval() in IE as it
declares some things as vars at the top level which are then apparently
out of scope later. (In general the google stuff needs some work in that
it declares a bunch of top-level variables which is bad.)

This is not an issue with Dojo, just eval() in general, I remember
hitting this before. So I'm planning on getting the unit tests and
examples working in IE tomorrow, then I will check stuff in. Essentially
I have to check every constructor in our code.

What I am doing:

1: Wrapping dojo.provides() and dojo.requires() and using those in a few
files as a test.
2: Using dojo.hostenv.loadUri() to perform the rest of the bootstrapping
until provides() and requires() are everywhere.
3: Making the class definitions in the tag mapping file
(xap/taghandling/plugin.xml) actually read from that file are created
dynamically.

I'm not going to convert every file to package-naming convention until I
first check in the above and have everyone review a bit. If everything
looks good then I convert everything to the xap.* naming scheme.

James Margaris

Reply via email to