[Cuis-dev] scrollbarThickness in Preferences (BlockClosures as preference types)

Gerald Klix cuis.01 at klix.ch
Thu Jul 14 10:24:52 PDT 2022


Hi Hilaire,

IC, this actually makes sense, because we
can compute the scrollbar size dynamically.

OK, case closed.


Thanks a lot and Best Regards,

Gerald



On 7/14/22 6:44 PM, Hilaire Fernandes via Cuis-dev wrote:
> Hi Gerald,
> 
> It is because this preference value is normally dynamically computed. So 
> the type of this preference is a Closure.
> 
> Read :
> 
> installMiscPreferences
>   ../..
>          name: #scrollbarThickness
>          category: #gui
>          value: [(Preferences at: #windowTitleFont) pointSize + 2];
> 
> When executing Preferences at: #scrollbarThickness put: 30, you are 
> implicitly changing the type of the preference from a Closure to an 
> Integer, and I initially forbid it.
> 
> It should be possible to hack by changing the type of the preference 
> too, implicitly or explicitly  however I am afraid this could lead to 
> some side border problem. We need to discuss a bit about that.
> 
> Hilaire
> 
> 
> Le 14/07/2022 à 15:27, Gerald Klix via Cuis-dev a écrit :
>> Hi all, Hi Juan,
>>
>> I can not set the scroll-bar thickness with:
>>
>> Preferences at: #scrollbarThickness put: 30
>>
>> because the preferences type is block closure.
>> Instead I have to use:
>>
>> Preferences at: #scrollbarThickness put: [ 30 ]
>>
>> It works (somehow), but is this really the intended behavior?
>>
>>
>> Best Regards,
>>
>> Gerald 
> 



More information about the Cuis-dev mailing list