AW: [PHPTAL] Slots - the second...

2010-06-25 Thread Per Bernhardt
For me it is exactly the other way around :)

When I return true in PHPTAL_Php_Attribute_METAL_FillSlot::shouldUseCallback(), 
my actual template works fine!
Returning false (and so disabling the optimisation) breaks the result.

It is the same with beta and the latest svn.

So maybe you should always use callbacks / optimisation?

Thanks so far!
Per





-Ursprüngliche Nachricht-
Von: phptal-boun...@lists.motion-twin.com 
[mailto:phptal-boun...@lists.motion-twin.com] Im Auftrag von Kornel Lesinski
Gesendet: Freitag, 25. Juni 2010 12:22
An: Template Attribute Language for PHP
Betreff: Re: [PHPTAL] Slots - the second...

On 25-06-2010 at 09:57:12 Per Bernhardt p...@webfactory.de wrote:

Thanks. That's a great example. I've turned it into a test case - and it passes 
in the SVN version, but it may be just because the test is short.  
There's optimisation that turns large slot fills into callbacks to save 
memory and improve streamability of documents.

Try changing
PHPTAL_Php_Attribute_METAL_FillSlot::shouldUseCallback()
and see if that fixes the bug.

--
regards, Kornel

___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: AW: [PHPTAL] Slots - the second...

2010-06-25 Thread Kornel Lesiński

On 25-06-2010 at 11:57:12 Per Bernhardt p...@webfactory.de wrote:


For me it is exactly the other way around :)

When I return true in  
PHPTAL_Php_Attribute_METAL_FillSlot::shouldUseCallback(), my actual  
template works fine!

Returning false (and so disabling the optimisation) breaks the result.

It is the same with beta and the latest svn.

So maybe you should always use callbacks / optimisation?


There's a setup cost involved for callback, so it doesn't make sense for  
very short slots.


I'd rather fix code for both cases.

--
regards, Kornel

___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal