[Seaside-dev] [Portability] WADynamicVariable >> defaultAction
James Foster
Smalltalk at JGFoster.net
Wed Oct 10 21:42:55 UTC 2007
Philippe Marschall wrote:
> Hi
>
> Looking at the Gemstone port I found their implementation of
> WADynamicVariable >> defaultAction is:
>
> defaultAction
> ^self class defaultValue
>
> which leaves it to the implementation how the problem should be solved
> whereas in normal Seaside it is:
>
> defaultAction
> self resume: self class defaultValue
>
> In Squeak both work because in the later case is delegated to UndefinedObject
>
> handleSignal: exception
> ^ exception resumeUnchecked: exception defaultAction
>
> From a portability point of view, which one is to be preferred?
>
> Cheers
> Philippe
>
Hi Philippe,
"It is erroneous to directly or indirectly send this message [#resume:]
from within a #defaultAction method to the receiver of the
#defaultAction method." -- ANSI section 5.5.4.6
In GemStone, sending #resume: from within a #defaultAction method
results in an walkback. Thus, the non-#resume: implementation is more
portable and matches the ANSI Specification.
James
More information about the seaside-dev
mailing list