Skip to main content
Inspiring
January 27, 2025
Question

why might getActivePhoto( ) return an empty table

  • January 27, 2025
  • 1 reply
  • 303 views
local photo = LrApplication.activeCatalog():getTargetPhoto() is returning an empty table, even though I have photos selected. I'm almost embarrased to ask, does anything spring to mind?
 

1 reply

johnrellis
Legend
January 27, 2025

I've never seen that before. The only thing that springs to mind is that preferences might be corrupted -- there have been a steady stream of infrequent reports over the years of selections working weirdly, corrected by resetting preferences and/or switching catalogs.

kimaldisAuthor
Inspiring
January 28, 2025

strangely, getActivePhotos() returns an array of selected photos correctly

 

also strangley, getActivePhoto is returning a zero length array when the documentation says it returns an LrPhoto.

 

kimaldisAuthor
Inspiring
January 28, 2025

Turns out it was a bug in my code mis-logging the photo object. Oops.