Re: [PHPTAL] Bug when popping context

2012-05-09 Thread Kornel Lesiński
On Wed, 09 May 2012 13:32:28 +0100, Pierre-Olivier Vares p...@fingerprint.fr wrote: I dropped this piece of code - I never use tal:define and metal:fill-slot in the same time. But has anybody an idea of a proper solution, correcting the 2 bugs ? Yeah, it's a tricky piece of code. I've

Re: [PHPTAL] ?Bug - setSource doesn't reset the template

2008-11-19 Thread Kornel Lesiński
On 19-11-2008 at 04:31:07 romtek [EMAIL PROTECTED] wrote: Please elaborate on this. Particularly, I don't know what an anonymous string is. Perhaps, a short example would be helpful. If you use $phptal-setSource(perror!), PHPTAL will report that you've got error in string XXX line 1, and

Re: [PHPTAL] ?Bug - setSource doesn't reset the template

2008-11-18 Thread Kornel Lesiński
On 18-11-2008 at 06:12:18 romtek [EMAIL PROTECTED] wrote: I'd like to understand the purpose of this method. Is it to initialize a template object with a template in memory, not in file? Yes. What's the path parameter for? For example it's displayed in error messages instead of anonymous

Re: [PHPTAL] ?Bug - setSource doesn't reset the template

2008-11-17 Thread Kornel Lesiński
On 16-11-2008 at 08:24:11 Dave Looker [EMAIL PROTECTED] wrote: I needed to generate several templates all using the same set of data so I populated a single template and then reset the template before each execute. However using setSource() to load a template instead of setTemplate()

Re: [PHPTAL] ?Bug - setSource doesn't reset the template

2008-11-17 Thread romtek
On Mon, Nov 17, 2008 at 4:18 AM, Kornel Lesiński [EMAIL PROTECTED] wrote: On 16-11-2008 at 08:24:11 Dave Looker [EMAIL PROTECTED] wrote: I needed to generate several templates all using the same set of data so I populated a single template and then reset the template before each execute.

[PHPTAL] ?Bug - setSource doesn't reset the template

2008-11-16 Thread Dave Looker
I needed to generate several templates all using the same set of data so I populated a single template and then reset the template before each execute. However using setSource() to load a template instead of setTemplate() does not seem to properly reset the state of the template. I

Re: [PHPTAL] bug with condition

2008-09-11 Thread Kornel Lesiński
On 11-09-2008 at 04:20:11 zou guangxian [EMAIL PROTECTED] wrote: If the code is: [CODE] div class=blank_bg tal:define=book relative/book tal:condition=php: count(book)0/div [/CODE] will generate [RESULT] ?php $ctx = $tpl-pushContext() ; $ctx-book = phptal_path($ctx-relative, 'book',

[PHPTAL] bug with condition

2008-09-10 Thread zou guangxian
Hi all: If the code is: [CODE] div class=blank_bg tal:define=book relative/book tal:condition=php: count(book)0/div [/CODE] will generate [RESULT] ?php $ctx = $tpl-pushContext() ; $ctx-book = phptal_path($ctx-relative, 'book', $ctx-__nothrow) ; if (count($ctx-book)0): ; endif ; $ctx =

RE: [PHPTAL] [bug]throw exception even if Context-__nothrow is true

2008-06-13 Thread zou guangxian
If I remember well, there's a tal:on-error attribute to catch exceptions: http://phptal.motion-twin.com/manual/en/#tal-on-error If I change play.html to [code] html tal:on-error=string:variables not defined here body span tal:content=name|defaultname/span span tal:content=ageage/span

Re: [PHPTAL] bug?

2008-03-19 Thread Kornel Lesinski
On 18 Mar 2008, at 22:32, Gosi wrote: i think there is a bug in PHPTAL.php at the executeMacro() method. the require_once at line 338 is missing. else { // call local macro require_once $this-getCodePath(); $fun = $this-getFunctionName() . '_' . trim($path); if

Re: [PHPTAL] bug?

2008-03-19 Thread Gosi
Hi Kornel, Kornel Lesinski schrieb: On 18 Mar 2008, at 22:32, Gosi wrote: i think there is a bug in PHPTAL.php at the executeMacro() method. the require_once at line 338 is missing. else { // call local macro require_once $this-getCodePath(); $fun = $this-getFunctionName()