Wish B4XTable - two events

LucaMs

Expert
Licensed User
Longtime User
B4XTable1_PageChanged (PageIndex As Int)
B4XTable1_PageDisplayingCompleted (PageIndex As Int) (or a better name, created by an Englishman 😊)

I mainly need the second one.

EDIT: The DataUpdated event fires when a new page is about to be displayed but before all views are shown. Then only the second event is needed (however, it would be useful if DataUpdated also provides the page index, without having to get it from the CurrentPage property)

P.S. Thinking better, you cannot change DataUpdated, as a matter of compatibility.
The request for the second event remains confirmed.

For the moment, as a workaround, I have put a sleep (400) at the beginning of the DataUpdated event but of course it is an empirical value.
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
"Unfortunately" I have now been able to remove that Sleep (400) because the project no longer crashes (before, without that, it did).

I don't know if I have an older version of the project where it was needed, I have to search for it. Writing a project to recreate the problem isn't easy at all.
 

LucaMs

Expert
Licensed User
Longtime User
I don't know if I have an older version of the project where it was needed,
No, I do not have it.
However, in a test the code in the event looked like this:
B4X:
B4XTabl1.Columns.Get(0).As(B4XTableColumn).CellsLayouts.Get(0).As(B4XView).Color = xui.Color_Red
and the project crashed because the view was not ready when I colored it (unless I have something else wrong but I don't think so).
(Note: I never keep the default name of the Views; here I changed it to B4XTable1 😊)

Anyway, if it happens to me again, I will inform you in this thread.
 
Top