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

Getting error after receiving CEP data on plugin.........

Engaged ,
May 20, 2016 May 20, 2016

when I am clicked on extension button ,then I select a AI file ,

after that when I am getting the extension's event  data on my plugin then I got a error (that error is showing after debugging )

that error message is like this

error.png

All the event parameter except type I am getting wrong data

error1.png

Is there any idea

Please share if any idea .

Regards

Kundan

TOPICS
SDK
1.7K
Translate
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
Adobe
Advocate ,
May 20, 2016 May 20, 2016

What does your javascript code that send the message do? Does it set the missing event parameters?

Translate
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
Enthusiast ,
May 21, 2016 May 21, 2016

Hi,

You need to retrieve the plugin context first.

This should be done by adding adding this line at the beginning of your method:

//Get Application Context.

AppContext appContext(gPlugin->GetPluginRef());

OkClickedFunc is declared as static method (not in the scope of your class).

This should work now.

Thomas.

Translate
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
Advocate ,
May 22, 2016 May 22, 2016

Toto RoToTO wrote:

Hi,

You need to retrieve the plugin context first.

This should be done by adding adding this line at the beginning of your method:

//Get Application Context.

AppContext appContext(gPlugin->GetPluginRef());

OkClickedFunc is declared as static method (not in the scope of your class).

This should work now.

Thomas.

Yes if he is going to call any SDK functions he needs to set the app context as the code is not called directly from a plugin message.

Setting the app context will have no effect on the event data which is what the question was about.

Translate
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
Enthusiast ,
May 23, 2016 May 23, 2016

you got a point!

Translate
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
Engaged ,
May 23, 2016 May 23, 2016

Thanks  the quick reply,

I am trying to do as you suggest ,then I will confirm you.

Thanks

Kundan

Translate
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
Engaged ,
May 23, 2016 May 23, 2016

I put AppContext appContext(gPlugin->GetPluginRef())

at the beginning of the function as you suggest.

But It gives the same error as given above.

It seems that I am using the extension written for cs5 that was in swf format

I think I have to change this swf file into HTML5/JS for cloud version

I already discussed about this  written Plugin  with you,It's described in this thread message 

How I will create the zxp file of aip file generating after build the solution..............

so please suggest how I will configure the swf file of extension for cloud version.

Thanks in advance

Kundan

Translate
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
Advocate ,
May 24, 2016 May 24, 2016

If people take the time to reply to your messages, you could at least read their replies.

kundank57145709 wrote:

I put AppContext appContext(gPlugin->GetPluginRef())

at the beginning of the function as you suggest.

But It gives the same error as given above.

This was suggested by Toto RoToTO. I replied to his post saying that it wouldn't have any effect on the problem you described.

Translate
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
Engaged ,
May 24, 2016 May 24, 2016

Actually In sample code I am getting this Java Script's file value inside

Plugin code .

error2.png

Please find it.

Regards

Kundan

Translate
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
Advocate ,
May 24, 2016 May 24, 2016

What is the javascript code for your plugin that doesn't work correctly?

Translate
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
Engaged ,
May 24, 2016 May 24, 2016

There is no any files in my pluginUI expecting  swf and manifest

error3.png

Please find it.

Thanks & Regards

Kundan

Translate
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
Advocate ,
May 24, 2016 May 24, 2016

You should have an mxml file that is used to generate the swf file.

Translate
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
Engaged ,
May 24, 2016 May 24, 2016

yes so how I will migrate this for cloud version ?

Please Assist.

Regards

kundan

Translate
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
Advocate ,
May 24, 2016 May 24, 2016

The swf file will still work in the "cloud version". Where is the code that sends the OkClicked event in the mxml file? Is your plugin code trying to access any of the event parameters that are not set?

Translate
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
Engaged ,
May 24, 2016 May 24, 2016

Yes my plugin code trying to access Click event parameter.

there is no any OkClicked method defined inside  xml file.

Please send me your email id I am sending my plugin UI code

and check.

Regards

Kundan

Translate
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
Engaged ,
May 24, 2016 May 24, 2016

Please find the click event code inside the mxml file

error5.png

Please find it.

Regards

Kundan

Translate
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
Enthusiast ,
May 26, 2016 May 26, 2016

here is a sample snippet:

try {

  var data:XML = <order>

  <uid>{generationUid}</uid>

  <selectedObjects>{selection.toString()}</selectedObjects>

  <document>

       <documentdirectory>{storeDirectory}</documentdirectory>

       <documentname>{assetName}</documentname>

  </document>

  </order>;

var extensionInitializedEvent:CSXSEvent = new CSXSEvent(event, CSXSEventScope.APPLICATION, data);

CSXSInterface.getInstance().dispatchEvent(extensionInitializedEvent);

  } catch (error:Error) {

      //do whatever you want.....

  }

Translate
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
Engaged ,
May 26, 2016 May 26, 2016

Thanks for reply.

What is the third parameter(data) in CSXSEvent function.

In my given swf file code there is two parameter

var _loc_1:* = new CSXSEvent("com.adobe.csxs.events.OkClicked", CSXSEventScope.APPLICATION);

so Please suggest what will be the third parameter here.

Regards

Kundan

Translate
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
Advocate ,
May 27, 2016 May 27, 2016

_loc_2 perhaps?

Translate
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
Enthusiast ,
May 27, 2016 May 27, 2016

Data object was declared and defined just above in my sample. 

Like Leo told you before, this should be _loc_2 in your sample.

Translate
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
Engaged ,
May 27, 2016 May 27, 2016
LATEST

Thanks for reply LeoTaro and Toto RoToTO

I will apply and confirm you .

Regards

Kundan

Translate
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