[Seaside] Home link

Avi Bryant avi at beta4.com
Wed Oct 20 15:21:34 CEST 2004


On Oct 20, 2004, at 3:12 PM, Giovanni Giorgi wrote:

> Avi Bryant ha scritto  in data 20/10/2004 13.18:
>
>> On Oct 20, 2004, at 12:32 PM, Giovanni Giorgi wrote:
>>
>>> Try to use goto: it works well.
>>> This code was posted by avi a lon time ago
>>
>>
>> Yes, and only works on Seaside 2.3 :).
>
> Oppps  :(
> Are you saying it doesn't  work in the new version seaside?
> And what we must use instead?
> (This news sounds terrible after I have written a lot of code using it 
> :P )

Sorry, I didn't mean to alarm you, I was just posting in a hurry.  Let 
me try to make up for that.

In Seaside 2.5, the simplest way of replacing a component visually with 
another is using #show:.  This is effectively the same thing as #goto:, 
so your old code would work fine if you did:

WAComponent>>goto: otherComponent
	self show: otherComponent

There is also #show:onAnswer:, which takes a block that will be 
triggered when the other component sends #answer: -

self show: yesNoDialog onAnswer: [:bool | bool ifTrue: [...] ifFalse: 
[...]]

This then gets combined with continuation capture to provide the more 
familar #call:

(self call: yesNoDialog)
	ifTrue: [...]
	ifFalse: [...]



More information about the Seaside mailing list