[Squeakland] bug in PasteUpMorph::cursorWrapped: ?

Nicholas Bennett nicholasjbennett at hotmail.com
Tue Jun 7 19:41:45 PDT 2005


karl,

Thanks for your reply.

I can see how one could code around the issue where ever one got caught by 
it.

I cannot help thinking though that the current #cursorWrapped 'just cannot 
be right' so I'll look into reporting a bug and providing a fix.

regards,
nicholas

>From: karl <karl.ramberg at chello.se>
>To: Nicholas Bennett <nicholasjbennett at hotmail.com>
>CC: squeakland at squeakland.org
>Subject: Re: [Squeakland]  bug in PasteUpMorph::cursorWrapped: ?
>Date: Sat, 04 Jun 2005 21:41:13 +0200
>
>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
><< Sketch5.jpeg >>




More information about the Squeakland mailing list