Example Project Issue: Listbox Basics

The example project: Listbox Basics
No changes made to the project.

Gives the following errors when running the project:

Windows 11, Xojo Version 2024r2.1
Listbox Basics.zip (12.3 KB)

change to RefreshCell

Thanks!
Flip side is that Xojo needs to fix it on their side.

@Craig_Boyd
Yes and hopefully they will.

If I remember correctly there was a ticket for this already.

Found the forum post that I was remembering

https://forum.xojo.com/t/trouble-wirth-expandable-listbox/75902/11

@Tim_Parnell was the answer person so deserves the :clap:

1 Like

Although nothing stops anyone who notices this from referring to the DesktopListbox doc, confirming that it indeed does not have InvalidateCell, but then checking what it does have that might be replacing it.

Good memory @brian_franco and certainly thanks to @Tim_Parnell !

Weird, no errors with macOS 13.6.9

@AlbertoD

Code is in a #if Target block

1 Like

Thanks @brian_franco that makes sense.

What doesn’t make sense is that
#72906 - Examples: Platform - Desktop - ListBox - ListBox Basics: Using InvalidateCell
hasn’t been fixed in a year!

Can someone at Xojo (or even MVPs) help with ‘simple’ fixes like this?

This example has not been updated for DarkMode either, this is what I see:
image

1 Like

If you haven’t already, try enabling the deprecation checkboxes under the Project > Analysis Warnings… menu.

This might help you spot these issues before spending too much time trouble-shooting.

Note: I think these settings are per-project, so you may need to enable them for each example you open.

Also note, this project compiles fine on macOS.

I opened the Examples zip and searched for a project with this name. I only get a .txt file.

I found a ListBox.xojo_binary_project, and your offending line does not exist there.

Are-you sure you have the 2024r2.1 examples archive ?

Edit:
The DesktopListbox in this example does not even have the name (found in your screenshot).

I was not looking in the zip archive. I downloaded it live from the search/filter screen.

1 Like

@Emile_Schwarz

I just opened the example from the IDE and the offending code is still there

Hi Craig,

I just checked and you are right; online, this is the old project.

Download the new zip archive and search for the one I named: same example, new version.

URL:
https://documentation.xojo.com/versions/2024r2.1/_examples/xojoexamples.zip

Thanks Emile, I appreciate it. :slight_smile:

@Emile_Schwarz
would not most people open examples from IDE? especially new users?

1 Like

and shouldn’t Live examples be the same (or newer) than an archive?

1 Like

You are correct, the offending code is still there:

I prefer download all examples instead of an example “à la demande” (as I am not always Internet ready…).

Craig, can you create an issue for that ?

@Emile_Schwarz
There is already issue created, is in my reply at the top