@zinc looks like you solved it, but ... I believe you can use wait_modal on the root view. Usually you will want a table view as a subviews of another view. A few View methods--including perhaps wait_modal -- might not work right.
You cannot use wait_modal from a callback, it can't run on the main thread, which is maybe the problem you had.
Also, it you are using wait_modal, you cannot have in_background on any of your button actions, since @in_background tries to queue on the same thread that is blocked when wait_modal is waiting (I think). So you have to use your own thread for one or the other.