I'm only starting to study LR SDK and has met a problem what I cannot pass
I use LR 3.2 and I'm trying to get Develop settings of picture. But the function getDevelopSettings always gives "assertion failed" error. (similar like i.e. photo:getRawMetadata( key ) function to, which I tried to use for test)
I tried to call a script for LrHelpMenuItems
I tried to receive the current photo as
local LrApplication = import 'LrApplication'
local catalog = LrApplication.activeCatalog()
local photo = catalog:getTargetPhoto()
and always when I try to call
local settings = photo.getDevelopSettings()
it produces "An Internal error has occured:assertion failed" alert. Even I tried to call it inside
catalog:withWriteAccessDo, LrTask.startAsyncTask or LrTask.pcall constructions.
There is not too many samples on forums about this function and I didnt find an answer on my question. Can somebody help me with it?
You need to use a ":" rather than a ".", since it's a method invocation:
Every one of us developers has tripped over that at some point. Frustrating that Adobe never bothered producing a better error message.
Many thanks! John. It indeed works now.
Only strange what other forums which I found like Debugging tips for Lightroom plugins
gave samples with "." instead of ":" and it confused me. I lost half a day in fighting with this so stupid issue but now I can go forward. Thank you again