[Bese-devel] Re: TAL mystery

Marco Baringer mb at bese.it
Thu Feb 2 10:01:59 UTC 2006


Matthew Danish wrote:

> (defcomponent view-wiki-page (window-component template-component)
>   ((page-name :accessor :page-name :initarg :page-name))
>     (:default-initargs :template-name "/home/mrd/ucw/wiki/view.tal"))

this is really weird. :template-names are resolved according to the
application's tal-generator (which is often tied to multiple different
directories). whatever generator you've used you should never have found
a tal file located at "/home/mrd/ucw/wiki/view.tal" (unless you had a
generator who's root directory was "/").

> I decided to check out the TAL file that I thought I had copied into
> that location.  Turns out, it didn't exist, I had copied it to the wrong
> directory.  And yet, the Wiki functions properly.  So tell me, exactly
> how does TAL find a copy of the template file it is supposed to use?

tal calls template-truename on the application's tal generator, if this
ruterns true then we call load-tal after have calculated the
tal-environment.

> How come the template worked, even though the pathname I specified did
> not exist?

i have no idea. the only thing i can think of is that somehow we're not
calling the expected render method, but looking at your class hierarchy
i can't think of which.

try tracing ucw::render-template, if that's getting called then at least
we know the problem is in ucw's template loading code, if it does't get
called then there's a render method being called when it shouldn't.

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen




More information about the bese-devel mailing list