« Return to Thread: Ending all callbacks/calls

RE: Ending all callbacks/calls

by Ramon Leon-5 :: Rate this Message:

Reply to Author | View in Thread

> Hello,
>
> I'm trying to add a "home" link/button to our application,
> which will return the user to the page after login, whilst
> not leaving a trail of calls/callbacks "hanging" in memory.
>
> We are using several tasks for some parts of this
> application, so I'll make a cut-down example.
>
> Root>>go
>   self call: TaskA
>
> TaskA>>go
>   self call: Component
>
> Component>>renderContentOn: html
>   html anchor callback: [ self session goHome ]; with: 'Home'
>
>
> What I have tried so far, is subclassing the session, and
> task and component with the following overrides:
>
> Task/Component>>call: aComponentOrTask
>   self session addCall: aComponentOrTask.
>   ^super call: aComponentOrTask.
>
> Task/Component>>answer: anObject.
>   self session removeCall: self.
>   ^super answer: anObject
>
> Session>>addCall: aComponentOrTask
>   calls add: aComponentOrTask
>
> Session>>removeCall: aComponentOrTask
>   calls remove: aComponentOrTask
>
> Session>>goHome
>   calls do: [ :each | each answer: nil ]
>
>
> However, the process will only send #answer: to the first
> component due to the continuations (I think.)
>
> Does anyone know of a way to effectively reset the
> application state to a specific callback?
>
> Many thanks,
> --
> John Thornborrow
> http://www.pinesoft.co.uk

Are you aware of WAComponent>>home, it does exactly this.  Sending home to
any component removes all decorations from it.

Ramon Leon
http://onsmalltalk.com

_______________________________________________
seaside mailing list
seaside@...
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

 « Return to Thread: Ending all callbacks/calls