Sair
  • Comunidade global
    • Idioma:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

[Q] Event handling tool, module and image

Colaborador ,
Oct 09, 2017 Oct 09, 2017

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

TÓPICOS
SDK
523
Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines

correct answers 1 resposta correta

LENDA , Oct 09, 2017 Oct 09, 2017

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()

Traduzir
LENDA ,
Oct 09, 2017 Oct 09, 2017

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()

Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines
Colaborador ,
Oct 10, 2017 Oct 10, 2017
MAIS RECENTE

johnrellis

Thank you very much for the pointers.

It is very helpful.

-Naoki

Traduzir
Denunciar
Diretrizes da comunidade
Seja respeitoso, dê crédito à fonte original do conteúdo e verifique se há cópias antes da publicação. Saiba mais
community guidelines