3 Replies Latest reply on Feb 17, 2009 9:50 AM by escouten

    LrDialogs.promptForActionWithDoNotShow(): reset "do not show", mandatory second button

    Level 1
      Tried to use this kind of dialog. Something like:

      LrDialogs.promptForActionWithDoNotShow({
      
        title = 'A title',
        message =' A message',
        actionKeyPref = 'instructionsUserAction',
        verbBtns = { { label = 'ok', value = 'ok } },
      })


      Two issues:

      1) How to reset "do not show" state?

      I want the code (user) to be able to reset it so that the dialog is shown again. Therefore, I tried to delete the property from the plugin's preferences with the custom key provided to the dialog constructor. Something like:

      LrPrefs.prefsForPlugin(nil)['instructionsUserAction'] = nil
      


      but the dialog is still not showing up again. I did not find an explicit description on how to reset the dialog. So I had to use the generic LrDialogs.presentModalDialog().

      2) Buttons

      My "instructions" kind of dialog does not require any kind of choice, so I just provided one button (ok/continue) in verbBtns. But... a second "cancel" button is always created as well. So I set its label to something like "return" although the existence of this button does not make any sense for the user interaction.
      The generic LrDialogs.presentModalDialog() does not seem to provide means to hide the second button as well.

      Herb