[Seaside] StateHolder

Masashi Umezawa umejava at mars.dti.ne.jp
Tue Mar 4 22:12:04 CET 2003


Hi,

Sorry for the late comment. But I have one simple question. 

> 2.  Seaside solves this by introducing a class for holding state that
> needs to be backtrack-aware.  A StateHolder is just like a ValueHolder,
> but it detects use of the back button, and adjusts its state accordingly.
> To be more specific: whenever a link is clicked on a page, all of the
> StateHolders for the current session take on the value that they had when
> that particular page was produced.

Why StateHolder does not have the same protocol (value/value:)
as ValueHolder?
I am (or other Smalltalkers would be) familiar with codes like this:

increment
    self count value: self count value + 1.

count
    count isNil ifTrue: [count := session newStateHolder].
     ^count

I think this will shorten the learning curve. (at least for VWers)

Cheers,
---
[:masashi | ^umezawa]



More information about the Seaside mailing list