What's the best way to manage a choice confirmation?

In my app I have a button to clear my TinyDB, what I need is opening a pop-up, asking the user "Do you really want to clear the DB?" and then act accordingly.

As far as I can see in the forum, there are (at least) a couple of possibilities:

  1. I add a notifer to my app which is specific to this. I use that notifier to show the ShowChooseDialog (btn1 = "Yes", btn2 ="No", Cancelable = false) and then I use its AfterChoosingEvent to decide what to do;
  2. I use just one notifier throughout my application, then I set a global variable "Reason" before showing the ShowChooseDialog to "DBCancelationConfirmation" and I fill in the AfterChoosingEvent with all the if-then-else I need to understand what choice (of the many that there could be in an app) is firing the AfterChoosingEvent. In this situation Reason = "DBCancelationConfirmation" and I can act accordingly

I guess there are pro and cons in both solutions.

What would you suggest to manage a similar situation? Is it just a matter of taste or there is something behind that I'm missing?

Ciao,
Max

P.S.
I think I (and probably many newbies) would be happy to have a kind of "design pattern" repository giving the best choices to manage usual programming tasks in App Inventor. I know about the FAQ section but it's not the same thing...

My personal preference is to devote a unique Notifier to this function and to name it accordingly, like ntfClearTinyDB.

Also, I would make its responses "Clear TinyDB" and Cancel.

This avoids tying together other requests like "Launch Missiles" and "Exterminate".

Using the word "Okay" requires the user to remember or have read what they are agreeing to, which is a lot to ask of modern users, with the attention span of a flea.

Further reading:

1 Like