[Seaside] Closures not working even with fixTemps?

Keith Hodges keith_hodges at yahoo.co.uk
Tue Dec 18 19:15:03 UTC 2007


itsme213 wrote:
> I can't get this to work right. At point 1>>, newModel is correct and 
> non-nil. At point 2>> newModel is nil. I'm trying this on 3.10gamma.
>
> Thanks -- Sophie
>
> renderNewModelButton: html
>   { M1. M2 } do:
>     [ : modelClass |
>        html submitButton
>        callback:
>          [ | newModel |
>            self session magma commit: [
>              newModel := self repository models add: modelClass new.
> 1>>          self halt] fixTemps.
>              self halt.
> 2>>          self call: (newModel viewerClass new model: newModel).
>              selectedModel := nil ] fixTemps;
>        value: #New , ' ' , modelClass name ] 
>
>
>   
FYI, the Automatic helpers do commit automatically any changes which
occur to the persisted data tree within callbacks.

Keith


More information about the seaside mailing list