[Seaside] [ENH] Session with (lazy) form-based login [with attachment]

Michal miso.list at auf.net
Thu Apr 1 07:04:31 CEST 2004


> That's a neat idea, and shows off Seaside in interesting ways.  Thanks. 
>  In terms of implementation, though, the manual swapping of root etc 
> seems unnecessarily complex.  Couldn't you have done this?
> 
> SeasideLoginSession>>user
>   ^ user ifNil: [user := root call: SeasideLogin new]
> 
> And then in SeasideLogin>>handleLogin, at the end, instead of directly 
> sending #user: to session, just #answer: the user object.

Yes, that's much more elegant. I didn't realise that call/answer could
be used at the session level. (To keep your implementation parallel to
my algorithm which reproproses a login window on failure, that would
presumably be:

SeasideLoginSession>>user
   ^ user ifNil: [
	[user isNil] whileTrue: [user := root call: SeasideLogin new]]

That requires a 'cancel' option to be fully usable, which I haven't
had time to put in yet. Should be trivial though.)

Michal


More information about the Seaside mailing list