On 02/04/2011 09:57 AM, Michael Pedersen wrote:
> The only reason I would not go with TW2 at this point is because
> tgext.menu, while it works, can be difficult. I have yet to hear of a
> way (short of hardcoding the JS paths) to ensure that JSLinks are
> loaded in the proper order, while TW1 has this ability working
> correctly already.
Do you mean resource dependency ordering doesn't work in TW2?  The docs
say it should work --
http://toscawidgets.org/documentation/ToscaWidgets/usage.html#resources
says:

-----
 - the widget declares two static dependencies, one to file.js and one
to bodybottom.js. Both are injected into the output. file.js defaults to
the location head, and thus is rendered there. bodybottom.js is declared
to be run at bodybottom, so there it goes.
- Additionally, file.js is declared to have a dependency itself - and
that dependency is injected before the file.js itself! This is a huge &
important feature - declaring dependencies like this will take away all
pains of maintaining order between your JS-files (and CSS) yourself!
-----

The syntax those docs are describing is:

-----
first_file = JSLink(modname="test", filename="first_file.js")
...
    javascript = [JSLink(modname="test", filename="file.js",
javascript=[first_file]),
                  JSLink(modname="test", filename="bodybottom.js",
location="bodybottom")]
-----

Tim

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to