Copiar link para a área de transferência
Copiado
Hi all,
I'm still new to Lua and not sure if we can implement in SDK,
but I'd like to handle following events.
1) Current module changes
There is LrApplicationView.getCurrentModuleName().
2) Current tool changes in Develop mode
There is LrDevelopController.getSelectedTool().
3) Selected image changes
There is LrCatalog.getTargetPhoto() and LrCatalog.getTargetPhotos()
1)-3) seems at least readable, so I think we can implement as timered polling.
But can it be event driven like addEventListner function in JavaScript?
Thank you,
Naoki
Polling can work pretty well if carefully implemented.
You might also consider:
LrAnalytics.observeModuleChange() -- undocumented, I've never seen reports of someone trying it
LrApplication.addActivePhotoChangeObserver() -- undocumented, Re: Observe when a photo has been selected within the library module?
LrDevelopController.addAdjustmentChangeObserver()
Copiar link para a área de transferência
Copiado
Polling can work pretty well if carefully implemented.
You might also consider:
LrAnalytics.observeModuleChange() -- undocumented, I've never seen reports of someone trying it
LrApplication.addActivePhotoChangeObserver() -- undocumented, Re: Observe when a photo has been selected within the library module?
LrDevelopController.addAdjustmentChangeObserver()
Copiar link para a área de transferência
Copiado
Encontre mais inspiração, eventos e recursos na nova comunidade da Adobe
Explore agora