[Seaside] Bug report in Live update

Michel Bany m.bany at wanadoo.fr
Wed Oct 27 09:32:46 CEST 2004


Avi Bryant a écrit :

>
> On Oct 4, 2004, at 9:52 PM, Michel Bany wrote:
>
>> I spotted a weird bug in the live update feature for <select>.
>>
>> In method #selectFromList:selected:callback:labels:liveCallback: the 
>> collection
>> in the first argument is expected to be indexed.
>> However, if the collection supplied by the sender is not indexed, the 
>> situation is hardly debugable.
>> It took me a couple of hours to spot it.
>> You will be able to see the effect for yourself if you change the 
>> test case WALiveRequestTest and
>> supply #(a b c) asSet rather than #(a b c) for the collection.
>
>
> Thanks, Michel.  I've adopted your suggested fix.
>
> Had you been using Squeak, this would have been much quicker to discover:
>
> "#(1 2 3) asSet at: 1" gives "Error: Instances of Set are not indexable".

Yes, VisualWorks does that too.
But in this specific case, this was not #at: that was sent to the Set object
but #at:ifAbsent: which is not understood by sets in both Squeak and 
VisualWorks.
See in method #selectFromList:selected:callback:labels:liveCallback:

This, however, is not the main point. We have two bugs here. The first one
reveals the second. Bug one is the DNU sending #at:ifAbsent: to a set.

The main point is that when that error occured within a live callback,
I did not get any debugger at all in either Squeak or VisualWorks.
The live callback was simply and silently not executed. This is bug two.

The idea had to occur to me to place a breakpoint inside the live callback
block or even prior to the evaluation of the live callback block, i.e.
in method #selectFromList:selected:callback:labels:liveCallback:

Then I could find out that the error is somewhat handled and a walkback
is rendered but it gets lost in continuations and the corresponding html
never finds its way to the web browser. I tried to debug further but had
to gave up when I found out that it was beyond me. Instead, I used
the fix that I suggested to eliminate bug one and hide bug two.

As I said, a weird bug.
Best luck ;-)
Michel



>
> Avi
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>


More information about the Seaside mailing list