Why do you want to call a function? There are many places to hook in;
your needs determine where to put it.
Pull weblocks-dev and look in contrib/s11001001/presentations.lisp for
an example of subclassing text-presentation to change how something is
rendered.¹ Receiving initializers for your presentation's slots from the
defview form is trivial.
Alternatively, if you are really looking for an observer on the
presentation process, maybe you want an :after method on rvfv, or rvf.
> also, what's the difference between render-view-field-value and print-
> view-field-value?
text-presentation's method for rvfv uses pvfv to stringify the value.
Thus, there is no rvfv for password-presentations and data-views, only
one for form-views: the pvfv method takes care of things for other
views.
¹Oops, just spotted an obvious bug in the parser…
--
I write stuff at http://failex.blogspot.com/ now. But the post
formatter and themes are terrible for sharing code, the primary
content, so it might go away sooner or later.
This is definitely a case where you ought to specialize
print-view-field-value instead. It will do all the HTML (and
highlighting, I guess) magic for you; you just answer a string from the
method, which I guess is answered from the function you're calling.
> ))))
Side note on Lisp style: please don't do this :)
> That's good to know. I was afraid I'd have to understand the parser/
> compiler, but it looks like the above works without that effort on my
> part!
I hope that defview's comment was helpful for you.
Looks like it.