[Seaside] anchorWithAction:text:
Julian Fitzell
julian at beta4.com
Tue Apr 8 00:39:50 CEST 2003
Brian Brown wrote:
> On Monday 07 April 2003 12:40 am, Avi Bryant wrote:
>
>>Brian,
>>
>>The code that will work for now is
>>
>>html openAnchorWithAction: [itemTarget mainContent: action].
>>html imageWithForm: (ImageImports at: rollOver)).
>>html close.
>>
>
> I now have a WAHtmlRenderer>>anchorWithAction:do
> anchorWithAction: actionBlock do: linkBlock
> self openAnchorWithAction: actionBlock.
> linkBlock value.
> self close.
>
> and a WAHtmlRenderer>>anchorWithAction:form:
> anchorWithAction: actionBlock form: aForm
> self anchorWithAction: actionBlock do: [self imageWithForm: aForm].
>
> ... which mostly works! One problem is that #imageWithForm opens an <img>,
> which has no closing tag in HTML, so when #anchorWithAction:do: is called,
> the self close. winds up putting an </img> tag instead of a </a> tag. Is
> there a way to "pop the stack" so to speak of the img tag as far as closure
> is concerned?
See the other message I just posted in reply to the thread "[Seaside]
[Q] table elements in loops?"
I think the problem is in #tag:do:. We may need to add a #close: method
again that goes up the stack looking for the right tag to close. The
current code is kind of fragile.
Julian
--
julian at beta4.com
Beta4 Productions (http://www.beta4.com)
More information about the Seaside
mailing list