[Cuis-dev] UI Bug - Incorrect dialog width in StringRequestMorph

Hernán Wilkinson hernan.wilkinson at 10pines.com
Mon Apr 28 13:06:25 PDT 2025


Hi Matias,
 thanks for the fix, but remember that we need the change set with the new
code if not, we do not know exactly what to change (we can guess) and no
history of changes is recorded.

 Please, send the change set as it says under "Contributing to Cuis" here:
https://cuis.st/community

Thanks!
Hernan.

On Mon, Apr 28, 2025 at 4:49 PM Matías Lang via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> Hey folks,
>
> I've noticed an annoying bug that occurs when the user edits a
> definition in the class browser, with a resulting source code
> referencing an invalid class name. If the user decides to define a new
> class, the widget asking the user for the code of the new class is
> smaller than it should be (see the attached screenshot demonstrating the
> problem). This dialog can't be easily resized, so working with it can
> become cumbersome.
>
> This dialog width problem can be replicated by running the following
> code:
>
> text := 'Object subclass: #SomeClass
>                 instanceVariableNames:
>                 classVariableNames:
>                 poolDictionaries:
>                 category: Testing'.
>
> StringRequestMorph request: 'title' initialAnswer: text do: []
>
> The problem seems to be caused by the following line:
>
> extraWidth := (6 * FontFamily defaultPointSize). "Some extra room for
> edition plus accept/cancel buttons." ].
>
> in the StringRequestMorph -> setQuery:initialAnswer: method.
>
> Changing the hardcoded constant from 6 to 10, which is the same value
> used for single line strings, seems to fix this issue.
>
> Hope this can be fixed, either by changing the constant as I did, or by
> using some other technique.
>
> Greetings,
> Matías--
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>


-- 

*Hernán WilkinsonAgile 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250428/a326aea6/attachment.htm>


More information about the Cuis-dev mailing list