• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Using otherVerb with LrDialogs.presentModalDialog

Explorer ,
Jun 27, 2020 Jun 27, 2020

Copy link to clipboard

Copied

So I have a modal dialogue where I would like to include a button to "Copy to Clipboard"

 

I think I have the coding, and I can change the label with otherVerb, but how do I add the function to the button? 

TOPICS
SDK

Views

260

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jun 28, 2020 Jun 28, 2020

[This post contains embedded images and formatting that don't appear in email. View the post in your Web browser to see the images and formatting.]

 

LrDialogs.presetModalDialog() will return "other" if the user clicks the third button (whose label is specified by "otherVerb"). So the code looks like:

 

local result = LrDialogs.presentModalDialog ()
if result == "other" then 
    ...logic for Copy To Clipboard...

 

[Use the blue reply button under the first post to ensure replies sort properly.

...

Votes

Translate

Translate
LEGEND ,
Jun 28, 2020 Jun 28, 2020

Copy link to clipboard

Copied

[This post contains embedded images and formatting that don't appear in email. View the post in your Web browser to see the images and formatting.]

 

LrDialogs.presetModalDialog() will return "other" if the user clicks the third button (whose label is specified by "otherVerb"). So the code looks like:

 

local result = LrDialogs.presentModalDialog ()
if result == "other" then 
    ...logic for Copy To Clipboard...

 

[Use the blue reply button under the first post to ensure replies sort properly.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 28, 2020 Jun 28, 2020

Copy link to clipboard

Copied

LATEST

OK, I read that but it just did not 'click'.

Pretty straight forward. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines