[Cuis-dev] Changeset to make GUI code more robust

Juan Vuletich juan at cuis.st
Tue Jan 27 09:04:55 PST 2026


Hi Hilaire,

On 2026-01-27 1:53 PM, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi Juan,
>
> This issue is very special and most of the time unlikely. It occurs  
> when editing by code an attribute which is normally set by GUI.
>
> As I don't want the user to be restricted by the GUI choice of color 
> when editing by code, this issue will raise.
>
And it needs to be fixed.

> The question is do we want this kind of situation to be fixed 
> downstream or upstream. Upstream it will be useful in other similar 
> situation. Fixing downstream can help to make some smart things, as 
> adding the a morph color to the dropdownlist, but it will not be a 
> generic solution.
>
In my opinion it is the drop down list who needs to know what to do in 
those cases. The current value is not one of the options. Adding it as 
an option would make sense to me.

Fixing it "upstream" is a bit like modifying Array to accept out of 
range indexes. It will end hiding bugs. It is the kind of thing that 
make Perl or Javascript bad languages.

> It can be handled in DropDownButtonMorph by catching the error, but I 
> find this inelegant, but may be it is not the case.
>
> Hilaire
>
> -- 
> http://mamot.fr/@drgeo

That's to be decided by DropDownButtonMorph. I wouldn't call it 
"catching the error" but "handling absent values".

-- 
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/5e9a4825/attachment.htm>


More information about the Cuis-dev mailing list