Lightroom: SDK: LrDialogs.presentFloatingDialog and .showStringsDialog undocumented

  • 3
  • Problem
  • Updated 5 years ago
  • (Edited)
The functions LrDialogs.presentFloatingDialog() and .showStringsDialog() are undocumented. Perhaps Adobe could provide a quick reply here with their signatures and what they do.


13/02/04 09:27:22com.johnrellis.logger TRACE Eval: LrDialogs
{--table: 1
messageWithDoNotShow = function: 0000000016A46990,
promptForActionWithDoNotShow = function: 0000000016A469E0,
confirm = function: 0000000016A46800,
resetDoNotShowFlag = function: 0000000016A46A30,
attachErrorDialogToFunctionContext = function: 0000000016A46530,
runOpenPanel = function: 0000000016A46580,
message = function: 0000000016A465D0,
runSavePanel = function: 0000000016A467B0,
presentFloatingDialog = function: 0000000016A46670,
stopModalWithResult = function: 0000000016A46760,
presentModalDialog = function: 0000000016A46940,
showModalProgressDialog = function: 0000000016A466C0,
showStringsDialog = function: 0000000016A46490,
showError = function: 0000000016A46620}
Photo of John R. Ellis

John R. Ellis, Champion

  • 3589 Posts
  • 928 Reply Likes

Posted 5 years ago

  • 3
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes
This works for displaying non-modal dialog box:

LrFunctionContext.postAsyncTaskWithContext( "test", function( context )
local LrPhotoPictureView = import 'LrPhotoPictureView'
local photo = catalog:getTargetPhoto()

local pictureView = LrPhotoPictureView.makePhotoPictureView{
width = 400, height = 400, photo = photo,
}

local result = LrDialogs.presentFloatingDialog {
title = "Thumbnail test",
background_color = LrColor ("white"), -- required for (uncolored) static_text display, else inside of box is black and so can't see black text.
contents = vf:column {
vf:static_text {
title = photo:getFormattedMetadata ("fileName"),
},
pictureView,
--vf:edit_field { - no sirve, presumably keystrokes are not trapped by box.
-- bind_to_object = prefs,
-- value = app:getGlobalPrefBinding( 'tempForTest' ),
--},
vf:push_button {
title = "Click me",
action = function( button )
app:show{ info="Pushed" } -- glorified call to LrDialogs.presentModalDialog - works.
end,
}
},
}

-- LrDialogs( app:getGlobalPref( 'tempForTest' ), result ) -- no sirve.

end )

Acknowlegement: John Ellis should get most of the credit for reverse engineering this function.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14049 Posts
  • 1735 Reply Likes
Hi John, unfortunately, this function is purposely not documented or supported at this time.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes
Thanks Jeffrey, for confirming it wasn't an oopsidental doc omission.

Note: it can be a *very* useful function for some plugins - I hope it receives documentation and full support in SDK 5.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3589 Posts
  • 928 Reply Likes
Ditto, thanks for the response. In general, I hope the SDK gets more love in LR 5.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14049 Posts
  • 1735 Reply Likes
I think there will be some love. :)
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes
Some plugin authors are using presentFloatingDialog (dunno 'bout the other) despite lack of documentation & support.

Although I understand Adobe does not officially condone such use, if there are any specific things such authors should be aware of, please do tell...

Thanks,
Rob
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14046 Posts
  • 1734 Reply Likes
Other than it's not ready for prime time, mostly on the mac side.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 379 Reply Likes
|> "...mostly on the mac side"

Thanks for the heads up ;-)
R