tags:

views:

89

answers:

1

I was started to work on my first sample of the dijit.Tree control.

When it didn't work, I added a couple of dijit.form.Textbox'es to the screen, and they didn't work either, even though I have them working fine on a similar form.

Interesting enough, when I killed FireFox and restarted it, I was got a clear message in FireBug console on what was wrong with my tree control, and got it fixed.

But now I'm rather puzzled while the simple dijits like NumberTextBox that I added are not working.

My Samples: 1) http://3wcloud-com-provisioning-qa.appspot.com/testDijitDate - this works great (except the initial date value not showing - I have a separate question open on that) 2) http://3wcloud-com-provisioning-qa.appspot.com/testDijitTree

I've done several "diff"s on the two files, and I kind find the difference that would cause one to work and one not to work.

Thanks, Neal

A: 

You should put your dojo.require statements immediately in a script block, not wrapped in the onload callback. Also, your input tags should be HTML style without the XHTML style slash (you didn't declare XHTML in your document) though I doubt that's the problem. See if either of those things help.

peller
I changed the inputs - same result.
NealWalters
I think you are wrong on the dojo.require. As per:O'Reilly Dojo book - "Because dojo.require statements act async over XDomain loads, it not necessarily safe to immediately use resources you have requested ... called "race condition". Using dojo.addOnLoad is a very good habit to get into because it makes your pages as portable as possible - whether or not it is XDomain loaded."
NealWalters
right... I think the book is suggesting that anything that uses the code loaded by the dojo.require must be in the addOnLoad, since the loading in the dojo.require() itself is asynch. In fact, your addOnLoad callback is not strictly defined to run before the parser, which itself is in Dojo's onload queue, but I think the queue is LIFO so you got lucky :) Either way, I agree, this doesn't seem to be your problem. Sorry I'm not seeing anything else obvious. I'll try to dig more if I can.
peller