[Cuis-dev] Cuis Morphic question

Thierry Goubier thierry.goubier at gmail.com
Mon Apr 15 09:35:15 PDT 2019


Hi all,

thanks for the answer. Yes, I've noticed it's used in one place, but 
nobody extends it...

And BorderedRectMorph has a #borderWidth: which uses a different 
mechanism (i.e. not part of the minimum extent of a BorderedRectMorph).

Thierry


Le 15/04/2019 à 16:16, Gastón Caruso via Cuis-dev a écrit :
> Hi, do you think it would be useful to add a comment in the method?
> 
>> On 15 Apr 2019, at 10:59, Fernando Gasperi Jabalera via Cuis-dev 
>> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>>
>> Hi Thierry,
>>
>> as Hernan pointed out, it's only use is in 
>> LayoutMorph>>#calculateMinimumExtent and it matches the comment found 
>> in the body of the method:
>>
>> /This is the number of pixels to add to internal minimum to calculate 
>> my minimumExtent. I don't have to do anything here. This is the 
>> default for my subclasses./
>> /
>> /
>> Morphs may shrink when resized but they have a minimum extent, they 
>> won't be displayed smaller than that minimum extent. You can think of 
>> it extent as the minimum size they require to be displayed without 
>> loosing it's meaningful representation. For example, if the morph 
>> represents a table with 4 legs and if shrinked past some threshold its 
>> legs disappear it stops representing the table it supposes to 
>> represent. The minimum extent tries to prevent this.
>> Coming back to your question, an extentBorder that by default returns 
>> 0 means that the border of the morph is not part of the essence of the 
>> morph. If a morph always requires its borders to be displayed because 
>> they are part of what it represents then it should redefine this 
>> message with the minimum meaningful extent of the borders.
>>
>> On Mon, Apr 15, 2019 at 8:55 AM Hernan Wilkinson via Cuis-dev 
>> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>>
>>     That message is being sent in LayoutMorph>>#calculateMinimumExtent
>>     My guess, I have not tried it yet, is that if you want a Morph
>>     with a bigger border you just have to redefine that message with
>>     number of pixels that you want the border to have
>>
>>     On Sun, Apr 14, 2019 at 12:31 PM Thierry Goubier via Cuis-dev
>>     <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>>
>>         Hi guys,
>>
>>         what is
>>
>>         Morph>>#extentBorder
>>
>>         used for? The only implementation is in Morph, and it allways
>>         return 0.
>>
>>         Thanks,
>>
>>         Thierry
>>         -- 
>>         Cuis-dev mailing list
>>         Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>>         https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
>>
>>
>>     -- 
>>     *Hernán Wilkinson
>>     Agile Software Development, Teaching & Coaching*
>>     *Phone: +54-011*-4893-2057
>>     *Twitter: @HernanWilkinson*
>>     *site: http://www.10Pines.com <http://www.10pines.com/>*
>>     Address: Alem 896, Floor 6, Buenos Aires, Argentina
>>     -- 
>>     Cuis-dev mailing list
>>     Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>>     https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
>> -- 
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
> 
> 



More information about the Cuis-dev mailing list