[Squeakland] bug in PasteUpMorph::cursorWrapped: ?

karl karl.ramberg at chello.se
Sat Jun 4 12:41:13 PDT 2005


Nicholas Bennett wrote:

>squeakers,
>
>I think the implementation for PasteUpMorph::cursorWrapped: is flawed.
>
>I used a Holder to hold 4 Sketches to use in an animation cycle. I made a 
>'tick count' variable and each tick of a scrip set the Holder cursor to tick 
>count. Once tick is greater than 4 things go wrong, the first sketch gets 
>shown twice and the last never.
>
>The code for PasteUpMorph::cursorWrapped looks like it would work if the 
>'indexing' of elements was zero based - but it seems to be '1' based - at 
>least for a 'Holder'.
>
>the relevant part of the method is:
>    t2 > submorphs size
>        ifTrue: [submorphs size > 0
>                        ifTrue: [cursor _ cursor \\ submorphs size]
>                        ifFalse: [cursor _ 1]].
>
>I think it probbaly means 'cursor _ cursor \\ submorphs size + 1' but there 
>could be other users of PasteUpMorph that are zero based.
>
>Is this a bug? seems that it would be easier to make animation cycles work 
>like kids would expect them to with a change like this. Can someone give me 
>a reference to the bug reporting / fixing proceedure for squeakland 
>codebase?
>
>regards,
>nicholas
>
>
>_______________________________________________
>Squeakland mailing list
>Squeakland at squeakland.org
>http://squeakland.org/mailman/listinfo/squeakland
>
>
>  
>
Why not use a etoy test. Take a look at the attached script.
Karl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Sketch5.jpeg
Type: image/jpeg
Size: 13759 bytes
Desc: not available
Url : http://squeakland.org/pipermail/squeakland/attachments/20050604/6400faaf/Sketch5-0001.jpeg


More information about the Squeakland mailing list