[Seaside] "Login" page

Richard K Eng richard.eng at rogers.com
Sun Jul 29 19:10:21 UTC 2007

I was trying to understand why this works. When I coded the block within the 
Login component, it did not work. I NOW SEE THE LIGHT!

It comes down to 'self'--which self are you calling method #call: from? It 
has to be the main component! Because the callback block has to capture the 
main component's context.

What I was doing was wrong because it was capturing the Login component's 
context--that's the reason GSServiceCentre was replacing the Login 
component! I learned something very important today. What an eye-opener.

Thank you very much.


Andrius Paulavicius wrote:
Add an instance variable called onSave and its accesor methods to Login
component. When you create you're login component pass it a block:
    login onSave: [self call: GSServiceCentre new].
and in Login components save method evaluate that block:
    onSave value.

> "Pass a callback block [self call: GSServiceCentre new] from you main to
> login component, and evaluate it with its method "value" when you want it
> executed."
> How do you do that? I'm not entirely familiar with Smalltalk syntax.
> Thanks,
> Richard

More information about the Seaside mailing list