"pythonwin" <[EMAIL PROTECTED]> writes:
> code of method of class of Root:
>
> @turbogears.expose(template=".templates.TabControl")
> def TabControl(self, *args, **kw):
> return dict(TabControl=TabControl())
>
>
> And for me all began to work.
It works or not? How it was before when it didn't work?
> I can not understand in what problem
Me neither. But to find out I'd first change the name of the method above to
be more PEP 8 compliant. Then I'd change the name of the template to be all
lowercase (I see that you use Windows, but there are other OSs that are case
sensitive for filenames).
Also, you have a widget named TabControl, a template names TabControl, a
method named TabControl and the variable inside the template is also
TabControl. Too many things with the same name to track. Applying PEP 8 will
help differentiating classes (the widget) from methods from variables. Using
the lowercase convention for the filename will help with the last confusing
case. So, *I* would have named them:
- TabControl --- widget
- tabControl --- method
- tab_control --- variable
- tabcontrol --- template
In fact, I'd use different names to avoid confusion. These are too easy to
confuse when reading or writing when you're tired...
After that, I'd insert log.debug() statements at strategic points and see what
is happening there. If debug doesn't do it, I'd use "print" until the widget
runs. I would also Insert log() statements at javascript code.
Those actions would make it easier to debug and find the problem.
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---