Keith Hodges wrote:
I was wondering if it might be worth dispatching the
calls
visitBrokenInternalLink: visitEmbeddedInternalLink: etc back to the Link
instance...
So that the types of link can render themselves appropriately.
Keith
Example:
PRRenderer-visitInternalLink: anObject
anObject isBroken
ifTrue: [ ^ anObject acceptLinkBroken: self ].
(anObject isEmbedded not or: [ self doesRemember: anObject target ])
ifTrue: [ ^ anObject acceptLinkGoto: self ].
self
remember: anObject target
while: [ anObject acceptLinkEmbed: anObject ]
PRInternalLink-acceptLinkBroken: visitor
^ visitor visitInternalLinkBroken: self
PRMyLink-acceptLinkBroken: visitor
^ visitor visitMyLinkBroken: self
Keith