#969: Node creation error in Kid ('NoneType' not callable)
----------------------+-----------------------------------------------------
 Reporter:  trlandet  |       Owner:  anonymous
     Type:  defect    |      Status:  new      
 Priority:  normal    |   Milestone:           
Component:  Kid       |     Version:  0.9a6    
 Severity:  normal    |    Keywords:           
----------------------+-----------------------------------------------------
 There is an error in kid when using py:defs with multiple code paths. What
 happens is that when one code path is triggered TurboGears+Kid will
 sometimes choose to 'optimize away' other code paths (I think that may be
 the case, anyway). When an other page is requested that triggers one of
 the other code paths I get "TypeError: 'NoneType' object is not callable".
 To me it seems like the elements that were not needed on the previous run
 are not there, but Kid thinks they should have been.

 Example:

 someBasePage.kid
 {{{
 <div py:def="hello(sayWhat, disable=False)">
     <div py:if="not disable" py:content="sayWhat"/>
     <div py:if="disable">no message</div>
 </div
 }}}

 childPageOne.kid
 {{{
 <div py:replace="hello('Hello world!')"/>
 }}}

 childPageTwo.kid
 {{{
 <div py:replace="hello('Hello world!', disable=True)"/>
 }}}

 I can't reproduce this using only Kid. It won't triger (in pure Kid) if my
 master template does not extend sitetemplate or if my master template has
 no py:defs on it's own (in TurboGears). I think there must be a problem
 with Kid+TurboGears. I get the same problem by using py:strip instead of
 py:if.

 I'm using TurboGears 0.9a6 on Python 2.4 on Windows XP

-- 
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/969>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Tickets" 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-tickets
-~----------~----~----~----~------~----~------~--~---

Reply via email to