[Cuis-dev] Changeset to make GUI code more robust
Juan Vuletich
juan at cuis.st
Tue Jan 27 06:15:25 PST 2026
Hi Hilaire,
Please read this message assuming I'm really trying to do my best both
to help you, and to keep Cuis clean.
A good bug report, as described in
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/GettingHelpWithCuis.md
and elsewhere is an invaluable tool. Just including the walkback stack
from the debugger you got would have saved me quite a bit of time.
In any case, I assume this "Edit style" window is part of DrGeo. And I
guess you are using a DropDownButtonMorph (or a subclass) from the
UI-Click-Select package. (If this is not the case, then you see why I
need more information to be able to understand reported problems).
Assuming I'm right, now there are additional senders of #getListItem:.
See that some of them are careful enough not to call with a zero
argument, and others don't have this care. If I'm correct in all this
guessing, the proper fix would be in DropDownButtonMorph >>
#updateButton. I don't know how the fixed code would look like. I'm not
really that familiar with these packages. What I'm almost sure is that
changing #getListItem: in the base Cuis image to handle a zero argument
is not the best solution.
Hope this helps,
On 2026-01-26 5:23 PM, Hilaire Fernandes via Cuis-dev wrote:
>
> This is what I tried to explained.
>
> It occurs with Smalltalk Script, for example
>
> (mySketch point: 0 at 0) color: (Color red adjustBrighness: 0.125)
>
> In the constructed sketch below, when the user decided to invoke the
> style dialog for point, this color is not one of the defined ones in
> the DrGeo drop down colors menu. In that circumstance, the index is
> zero and the GUI crash. In the picture below, I can set the selected
> color to none (the button is empty) because nil is returned instead of
> an index access error. For DrGeo to take of this situation, I need the
> GUI to return nil and not throw an error.
>
> Le 26/01/2026 à 19:54, Juan Vuletich a écrit :
>>
>> I can not see how #getListItem: could be called with a 0 argument.
>> Perhaps it is the sender in DrGeo that can take care of that?
>>
>> Thanks,
>>
> --
> http://mamot.fr/@drgeo
>
--
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260127/9be45e52/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 7Gk14KDQ109D0LJR.png
Type: image/png
Size: 16841 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260127/9be45e52/attachment-0001.png>
More information about the Cuis-dev
mailing list