[Cuis-dev] Infinit loop with Layout

Juan Vuletich JuanVuletich at zoho.com
Mon Apr 18 07:23:09 PDT 2022


On 4/13/2022 5:16 PM, ken.dickey--- via Cuis-dev wrote:
> On 2022-04-12 12:12, Hilaire Fernandes via Cuis-dev wrote:
>
>> The following code put Cuis in an infinite loop. .. 
>> (ZeroDivideLayout.txt)
>
> Hilaire,
>
> Thanks much for reporting this!
>
> The loop is caused by a zero divide error in 
> ##PlacedMorph>>allocHeightForFactor: during a redraw.
>
> Fix is attached.
>
> Juan, please review and integrate.
>
> I set a minimum proportional value to 0.01 (1%) and a minimum fixed 
> value to 2 (pixels).
>
> You may wish to use other default values.
>
> Cheers,
> -KenD

I pushed to github a different fix: if proportional part is zero, the 
#isProportionalHeight is false. I think it is a bit better.

Thanks,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
https://independent.academia.edu/JuanVuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://patents.justia.com/inventor/juan-manuel-vuletich
https://twitter.com/JuanVuletich



More information about the Cuis-dev mailing list