[squeak-dev] Re: Resume Problems
Klaus D. Witzel
klaus.witzel at cobss.com
Fri Dec 19 10:56:01 UTC 2008
On Fri, 19 Dec 2008 10:51:01 +0100, Zulq wrote:
> Hi All,
>
> Perhaps I am misunderstanding the behaviour of
>
> I have a class SoupTag which holds a dictionary of attributes and a
> collection of children which are also soup tags.
>
> As a shorthand for attribute access, SoupTag implements:
...
> But all I get is infinite recursion from the doesNotUnderstand. I think
> this should work as this little test demonstrates:
>
> [('abc' + 1) + 1]
> on: MessageNotUnderstood
> do: [:e | e resume: 1] " prints 2 "
Nah, the result has nothing to do with #on:do: resuming with 1, you better
try
[('abc' + 1) + 1]
on: MessageNotUnderstood
do: [:e | e resume: -1]
which still says 2. This because someone, behind you back, put #asNumber
arithmethic into ByteString ... now this attempts (Number readFrom: 'abc')
which gives 0 for your +1 +1 and so 2.
You may want to start DNU testing with ('abc' break; + 1) and then see
where it goes.
HTH.
/Klaus
> Any help is greatly appreciated.
>
> Thanks,
> Zulq.
>
--
"If at first, the idea is not absurd, then there is no hope for it".
Albert Einstein
More information about the Squeak-dev
mailing list
|