[Seaside] odd difference in behavior when using
WADispatcher>>register:
Bob Arning
arning315 at comcast.net
Fri Jun 29 17:52:15 UTC 2012
It's always dicey to iterate over a collection that you are modifying.
Iterate over a copy and update the original.
Cheers,
Bob
On 6/29/12 1:39 PM, Lawson English wrote:
> This only partially works (some of the Dispatchers are left unmoved):
>
>
>
> "++++++++++++++++++++++++++++++++++++++++++++++"
> defaultH := WADispatcher default.
> innerDispatcher := defaultH handlerAt: 'innerdispatcher'.
>
> defaultH handlers keysAndValuesDo:
> [:key :value|
> ((key = 'innerdispatcher' or: [key = 'browse']) or: [key =
> 'welcome']) ifFalse:
> [
> defaultH unregister: (defaultH handlerAt: key).
> innerDispatcher register: value at: key.
> ]
> ]
> "++++++++++++++++++++++++++++++++++++++++++++++"
>
>
> Any ideas?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120629/390ddbe1/attachment.htm
More information about the seaside
mailing list