I solved it, but only partially. Since I’m updating a tableview, I hooked a function to the onAdd event of the datasource I’m using, and then I count how many elements have been added: when I reach the desired number, I re-enable the button. The problem that I haven’t solved yet is that sometimes, after several launches of the app, it continues to crash with a segmentation fault. But it could also be due to my ignorance in something, since I’ve been using Haxe and HaxeUI for a few weeks.