“Listen carefully, I shall say this only once…”


If you are a fan of the old BBC sitcom “Allo Allo” you will most likely recognize the sentence “Listen carefully, I shall say this only once”. If not, please hold on, I promise the rest of this post will make more sense.


In 3.0 a few new methods were introduced on the Box class to allow you to present information to the user and allow the user to choose not to see the same information again. Here is how the call could look:

Box::infoOnce("Listen carefully",

             "I shall say this only once...",

             'HELP URL',

              'Owner');


In 4.0 a single new method has been added to the Box class to ask the user yes/no questions and let the user choose to save the answers instead of being asked over and over. Here is how to make the call:

Box::yesNoOnce("Listen carefully",

               "Are you sure you want to ....",

               DialogButton::No,

               'Owner' /* E.g. formRun.name() */);


The call will return the saved answer if the user has answered the question once and chosen to not be asked again.


The concept can easily be extended to other combinations of answers, like for example No/Yes/Cancel.


This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm

Comments (2)
  1. Kamal says:

    Hi,

      Your blogs are extremely wonderful and interesting and useful, Thank u

  2. Volker Leiner says:

    Hi, great tip, thanks!

    Interesting info might be, how to find the answer in the usage data to reset/delete the answer: On tab ‘All usage data’ search for Name ‘*box*’.

Comments are closed.

Skip to main content