[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TestClearButton


On Sat, 3 Jan 2026 at 21:01, Benoît Minisini <
benoit.minisini@xxxxxxxxxxxxxxxx> wrote:

> Le 03/01/2026 à 21:28, Lee a écrit :
> > On 1/3/26 2:52 PM, Benoît Minisini wrote:
> >> It's because the ComboBox searches the clear button icon in the icon
> >> stock, and 'gb.form.stock' is not loaded.
> >>
> >> Maybe it should use in that case a default clear button instead of
> >> raising an error...
> >
> >  From what I could tell by looking at the code, it attempts to load
> > "clear.png". And, if it not found in the current directory is moves up
> > the directory tree trying to find it. (I'm not sure of that as I do not
> > understand the use of SUPER in a class that inherits no parent.)
> >
> > A /comp/src/gb.gui.base/clear.png symbolic link exists which points
> > to ../gb.form.stock/gambas-thin/128/clear.png which also exists. If my
> > (mis)understanding of bMoveUp and Super.Load is correct, it seems to me
> > it should work.
> >
>
> The problem should be fixed by the last commits.
>
> Regards,
>
> --
> Benoît Minisini.


I'm still getting issues.
To reproduce..
1. load any project.
2. click a control.
3 click in the "Group" property field.

throws an error.

Unable to load image.
[gb.gui.base].ComboBox.UpdateClearButton.225

I think it is something to do with Image.Load() on that line.

This code...
        If Component.IsLoaded("gb.form.stock") Then
          $hClearImage = Image.Load("icon:/128/clear")
        Else
makes the error.

If i change it to this code...
        If Component.IsLoaded("gb.form.stock") Then
          $hClearImage = Picture["icon:/128/clear"].Image
        Else
Then no error.

(shouldn't you do it similar to that anyway to handle dark theme ? )

Respects
BruceS

Follow-Ups:
Re: TestClearButtonBruce Steers <bsteers4@xxxxxxxxx>
References:
TestClearButtonCD <dessere.claude@xxxxxx>
Re: TestClearButtonLee <t.lee.davidson@xxxxxxxxx>
Re: TestClearButtonBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: TestClearButtonLee <t.lee.davidson@xxxxxxxxx>
Re: TestClearButtonBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>