It appears the way Mason interprets SELF: is not logical. If I have a
component that calls a method via:
<& SELF:method &>
I would expect that it would look inside the current_comp first to see
if there exists a method by that name and execute it. However, Mason
uses base_comp which does not always get updated to be equal to
current_comp.
For instance if I access a page /foo/bar/baz.html which has a a call
as defined above and I have an /autohandler that does this:
<& /include/body.html &>
and then inside /include/body.html do this:
$m->call_next;
The /foo/bar/baz.html component is called eventually but then causes
an error because SELF:method resolves to /include/body.html:method
rather than /foo/bar/baz.html:method which is what I would expect.
As a workaround I can change the call in autohandler to:
<& $m->fetch_comp('/include/body.html') &>
but this is pretty ugly... why include the short hand way of doing it at all!!!
PARENT: = parent
REQUEST: = request
SELF: should equal the component which is executing RIGHT NOW not some
other component!!
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users