ListSelectionNotificationReceiver: a frustrating problem

after hours of searching i still haven’t found a reason why a simple program doesn’t work. The following screen shot can help to clarify my problem:

The class MyReceiver uses the interface listSelectionNotificationReceiver and adds the methods SelectionChanged and SelectionChanging. In SelectionChanging I added a MessageBox(“Changing”) and in SelectionChanged a MessageBox(“Changed”). No compilation errors but nothing happens (no messages) when I select another row in Listbox1.

If you’ve got this example project showing it not working, post the project here for further review or make an issues ticket about the framework malfunction.

@Tim_Parnell Thank you, Tim. Here is the project file…

ListNotifierTest.xojo_binary_project.zip (5.5 KB)

I tried a few different tests and couldn’t get anything to work. I even recreated the whole thing in the non-Desktop controls and it still failed.

I’m not an expert on this specific interface, I use Changed events; but it should be working. I’d say file an issues ticket.

1 Like

@Tim_Parnell Thank you. I also tried a lot of things in the last few days but nothing happened. Before, I always used ListBox events but it looks great to use ListSelectionNotificationReceiver if you want to notify several classes that a new ListBox selection took place. I will file an issues ticket.

And the documentation needs an example.

Interfaces are described here: Interfaces — Xojo documentation.

@Beatrix_Willius I agree:I invested a lot of time to find out everything starting from the limited documentation: I started from DesktopListbox with the following ‘challenging’ description:

@Carlos_De_Backer
If you create an issue it would be interesting to see what replies from Engineering it gets.
I faintly remember using these interfaces back in the REALbasic days when we could create our own bindings but that is gone now and I wonder if the interfaces need updating and also the documentation.

The ActionNotificationReceiver seems to work for DeskTopButton ActionNotificationReciever
And that is how we used to use binding to a listbox with ListSelectionNotificationReceiver

@brian_franco Brian, I filed an issues ticket (#78491). The available documentation is really very limited. It would be easy when you can start from an example. But an example was not available. I spent many hours to search for the flow needed. This was really very frustrating.

I keep you informed what the answer will be from the engineers.

1 Like

@Tim_Parnell @brian_franco @Beatrix_Willius Apparently it was a bug and seems to have been fixed (available in the next release?)

Usually the fixed cases show a label with the version when the fix will appear.
In this case it looks like it will be included in Xojo2025r1.

@Carlos_De_Backer
Nice! :+1:

That of course, is Xojo’s plan, but is not a guarantee.

it was a question from one of my students how this method could be used. In this case he will have to be patient for a while. But for once the teacher is not wrong…