There's definitely something I'm doing wrong, I'm just not sure what it is. I
started a Hello World application called "test" and arrived at the exact
same conclusion with the top level "dialog" variable missing. Here are the
exact steps I took:
Created Hello World application called "test"
Opened test/config.json, changed the CACHE key to "cache"
Ran the generator, confirmed creation of the cache directory in the right
place, confirmed that the application works as it should
Uncommented the "jobs" key in config.json, changed the manifest key from
"contrib://SkeletonApplication/trunk/Manifest.json" to
"contrib://Dialog/trunk/Manifest.json"
Opened Application.js, changed "alert("Hello World!");" on line 71 to
dialog.alert("Hello World!");
Ran the generator again, it informs me " - downloaded contrib:
Dialog/trunk", library directory in the cache was scanned, cleared my
browser cache, and reloaded the test app page.
Result: same error when I click the button
Then I started experimenting with the Dialog demo that downloads with the
Dialog library. I changed the config and generate.py to point at my qooxdoo
installation, built it, and browsed the source. The demo works great. So I
copied the meat from the demo's Application.js and pasted it into my test
project's Application.js, built my test project, and now instead of 196
classes reported in the generator output, there are 274. Huzzah! My test app
works with the demo's code. After looking closer at the demo's code, I don't
find anything special that my test app didn't have, so I started removing
chunks of it, rebuilding the source each time and refreshing in my browser.
I found that when I take out the code to draw the "wizard" dialog, the
dialog libraries are no longer included when you run the generator. I also
noticed that the wizard dialog is the only one created with the "new"
keyword. After more digging, it looks like the nature of the deferral in
Dialog.js was causing my problems all along. All I had to do was change my
"dialog.alert("Hello World!");" line to "new dialog.Alert({ "message":"Hello
World", "callback":null, "context":null}).show();", the generator included
the necessary files and it all worked.
********** CLIFF'S NOTES / TL;DR **********
The Dialog library files aren't included in the project unless you
instantiate at least one class with the "new" keyword, so the "dialog"
global is created. After that, the shortcut methods may be used.
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/Cannot-get-the-Dialog-contrib-or-any-libraries-to-load-tp5266735p5271609.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel