Acknowledged

The sample projects Toasts and Selectable are broken in 4.2.0-beta2

% cd $sdk420/samples/Selectable
% "$sdk420/bin/monkeyc" "-o" "bin/Selectable.prg" "-f" monkey.jungle "-y" "$developer_key" "-w" "-l" "1" "-d" "approachs60"
WARNING: approachs60: The launcher icon (16x16) isn't compatible with the specified launcher icon size of the device 'approachs60' (40x33). Image will be scaled to the target size.
ERROR: approachs60: Could not resolve /images/back_default.png
ERROR: approachs60: Could not resolve /images/back_pressed.png
ERROR: approachs60: Could not resolve /images/menu_default.png
ERROR: approachs60: Could not resolve /images/menu_pressed.png
ERROR: approachs60: An undefined resource reference was detected during resource processing: @Drawables.DefaultBackButton.
ERROR: approachs60: An undefined resource reference was detected during resource processing: @Drawables.PressedBackButton.
ERROR: approachs60: An undefined resource reference was detected during resource processing: @Drawables.DefaultMenuButton.
ERROR: approachs60: An undefined resource reference was detected during resource processing: @Drawables.PressedMenuButton.

But if I compile it (the same project, taken from the 4.2.0beta2 samples) with 4.1.7 the compilation succeeds, and I can run the resulting program. So this is probably a bug in 4.2.0 (unless there's a subtle bug in the project that earlier compilers simply didn't notice).

For Toasts, I get

% cd $sdk420/samples/Toasts
% "$sdk420/bin/monkeyc" "-o" "bin/Toasts.prg" "-f" monkey.jungle "-y" "$developer_key" "-w" "-l" "1" "-d" "fenix7"
ERROR: Device 'fenix7' does not support API Level '4.2.0'.

And this time 4.1.7 agrees. So in this case it looks like the sample project needs fixing.

Parents
  • Well, here's what's in bitmaps.xml

    <resources>
        <bitmap id="LauncherIcon" filename="images/icon.png" />
        <bitmap id="checkBoxDefault" filename="images/checkbox_default.png" dithering="none" />
        <bitmap id="checkBoxSelected" filename="images/checkbox_selected.png" dithering="none" />
        <bitmap id="checkBoxHighlighted" filename="images/checkbox_highlighted.png" dithering="none" />
        <bitmap id="checkBoxHighlightedSelected" filename="images/checkbox_highlighted_selected.png" dithering="none" />
        <bitmap id="DefaultBackButton" filename="/images/back_default.png" dithering="none" />
        <bitmap id="PressedBackButton" filename="/images/back_pressed.png" dithering="none" />
        <bitmap id="DefaultMenuButton" filename="/images/menu_default.png" dithering="none" />
        <bitmap id="PressedMenuButton" filename="/images/menu_pressed.png" dithering="none" />
    </resources>

    It's pretty clear that the absolute paths are incorrect there. In fact the surprise (to me) is that the older compilers accept this. But 4.2.0 does not (on MacOS at least).

    In any case, it just seems weird that Garmin would make a release without (at least) building all the sample projects on all supported platforms.

Comment
  • Well, here's what's in bitmaps.xml

    <resources>
        <bitmap id="LauncherIcon" filename="images/icon.png" />
        <bitmap id="checkBoxDefault" filename="images/checkbox_default.png" dithering="none" />
        <bitmap id="checkBoxSelected" filename="images/checkbox_selected.png" dithering="none" />
        <bitmap id="checkBoxHighlighted" filename="images/checkbox_highlighted.png" dithering="none" />
        <bitmap id="checkBoxHighlightedSelected" filename="images/checkbox_highlighted_selected.png" dithering="none" />
        <bitmap id="DefaultBackButton" filename="/images/back_default.png" dithering="none" />
        <bitmap id="PressedBackButton" filename="/images/back_pressed.png" dithering="none" />
        <bitmap id="DefaultMenuButton" filename="/images/menu_default.png" dithering="none" />
        <bitmap id="PressedMenuButton" filename="/images/menu_pressed.png" dithering="none" />
    </resources>

    It's pretty clear that the absolute paths are incorrect there. In fact the surprise (to me) is that the older compilers accept this. But 4.2.0 does not (on MacOS at least).

    In any case, it just seems weird that Garmin would make a release without (at least) building all the sample projects on all supported platforms.

Children
  • This sample has been around for a long time, so I'm not sure what's up for you.

    Well, as I've made clear, what's up is that the new compiler (correctly in my opinion) rejects the non-relative paths on MacOS and (as Ive just verified) Linux. I've also confirmed that it still works on Windows.

    So, depending on what Garmin decides, its either a bug in the old compiler, and the new windows compiler, and samples/Selectable needs to be fixed; or its a bug in the new MacOS and Linux compilers, and the compilers need to be fixed.

  • my bitmap.xml is the same for selectable, and it builds and runs fine on win11 and if I look at the sample from 4.1.4, it's the same.  This sample has been around for a long time, so I'm not sure what's up for you.