On Aug 20, 2006, at 7:03 PM, glenn wrote:

>
> Hi
> As a learning exercise, Im trying to use some of the features in turbo
> tunes tutorial to another case. Im finding though that when I try to
> use 'replaceChildNodes' with the rendered widget I get a javascript
> error: "TR is not defined - tg_static/js/widget.js line 40"
>
> I presumed it was a bug first - so I downloaded the tubrbotunes sample
> and it ran fine - guess its not a bug in tg - has any one ran into  
> this
> before? what is it that  I might be missing thats causing this  
> problem?

TR is a Mochikit function. You're probably not including Mochikit in  
your page.

You can include it in a per-controller basis by returning it's widget  
in the output dict:

from turbogears.widgets import mochikit

class Root(...):
        @expose(...)
        def controller_method(...):
                ...
                return dict(m=mochikit, ...)

or let TG include it in every page automatically by setting:

# List of Widgets to include on every page.
tg.include_widgets = ['turbogears.mochikit']

in yourapp/config/app.cfg

HTH,
Alberto

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to