[Seaside] Do not call #renderContentOn: directly (was: gotos with
2.3b?)
Ragnar Hojland Espinosa
ragnar at linalco.com
Fri Jun 6 12:40:17 CEST 2003
On Fri, Jun 06, 2003 at 02:12:35AM -0700, Avi Bryant wrote:
>
> On Fri, 6 Jun 2003, Ragnar Hojland Espinosa wrote:
>
> > I suppose goto is now #delegate: right?
>
> No, I'm pretty sure #delegate: (if it exists) would or should be a private
> method. Is there no #goto: in 2.3? (Can you tell I'm not somewhere that
> I can access the source? ;)
There Is No Goto. ;)
call: aComponent
^ self delegateTo: aComponent during: [aComponent call]
delegateTo: aController during: aBlock
|value saved|
saved _ self delegate.
self delegate: aController.
value _ aBlock value.
self delegate: saved.
^ value
delegate: aController
delegate ifNil: [delegate _ WAStateHolder new].
delegate contents: aController
I got a little confused there.
> To be honest, I'm not certain of the usefulness of #goto:. I can't
> remember exactly what all the implementations have been, but mostly it's
> been a hook for further optimization - it just sends #call:, but
> since by using #goto: you're asserting that you don't expect it to return,
> in theory it could be changed later to be more efficient.
>
> Whether it's worth introducing the confusion of having both #call: and
> #goto: to support this hypothetical future efficiency gain, I'm not at all
> sure. Thoughts?
I don't really mind either. It's easier to express "purpose" using
#call: and #goto: but besides that..
--
Ragnar Hojland - Project Manager
Linalco "Especialistas Linux y en Software Libre"
http://www.linalco.com Tel: +34-91-5970074 Fax: +34-91-5970083
More information about the Seaside
mailing list