Highlighted

Using otherVerb with LrDialogs.presentModalDialog

Explorer ,
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? 

Most Valuable Participant
Correct answer by johnrellis | Most Valuable Participant

[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.]

TOPICS
SDK

Views

66

Likes

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

Using otherVerb with LrDialogs.presentModalDialog

Explorer ,
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? 

Most Valuable Participant
Correct answer by johnrellis | Most Valuable Participant

[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.]

TOPICS
SDK

Views

67

Likes

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
Jun 27, 2020 0
Most Valuable Participant ,
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.]

Likes

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
Reply
Loading...
Jun 28, 2020 0
MomaZunk LATEST
Explorer ,
Jun 28, 2020

Copy link to clipboard

Copied

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

Pretty straight forward. 

Likes

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
Reply
Loading...
Jun 28, 2020 0