• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Passing data/variables from Dialog controller And Action component

Community Beginner ,
Sep 23, 2020 Sep 23, 2020

Copy link to clipboard

Copied

Hi ,

I am writing a custom plugin for Indesign.  I want a way to pass data between dialog controller and access it in action component or dialog observer . What is the recomended way to do this? 

e.g Data data is filled in login dialog(username and password). I want to then use this data in action component on login action id. 

 

Thanks

 

TOPICS
How to , SDK

Views

191

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 23, 2020 Sep 23, 2020

You need to addin an interface on kSessionBoss, so you don't need documentation of the existing interfaces on the boss class. See the Basicpersistence sdk sample, it explains how to addin interfaces to existing boss classes. If you don't need to keep the value preserved across multiple InDesign sessions you can avoid making your interface persistent. Have a look at this sample and read about addin in the programming sdk it will be more clear.

-Manan

Votes

Translate

Translate
Community Expert ,
Sep 23, 2020 Sep 23, 2020

Copy link to clipboard

Copied

You could addin an interface to the kSessionBoss class, write to this interface the data that you want to share and then you can access it in action component etc.

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 23, 2020 Sep 23, 2020

Copy link to clipboard

Copied

Thanks for reply!

I checked the documentation for kSessionBoss, but the member functions are undocumented. Is there any SDK sample that will provide me example of it?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 23, 2020 Sep 23, 2020

Copy link to clipboard

Copied

LATEST

You need to addin an interface on kSessionBoss, so you don't need documentation of the existing interfaces on the boss class. See the Basicpersistence sdk sample, it explains how to addin interfaces to existing boss classes. If you don't need to keep the value preserved across multiple InDesign sessions you can avoid making your interface persistent. Have a look at this sample and read about addin in the programming sdk it will be more clear.

-Manan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines