Copy link to clipboard
Copied
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
All the event parameter except type I am getting wrong data
Is there any idea
Please share if any idea .
Regards
Kundan
Copy link to clipboard
Copied
What does your javascript code that send the message do? Does it set the missing event parameters?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
you got a point!
Copy link to clipboard
Copied
Thanks the quick reply,
I am trying to do as you suggest ,then I will confirm you.
Thanks
Kundan
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Actually In sample code I am getting this Java Script's file value inside
Plugin code .
Please find it.
Regards
Kundan
Copy link to clipboard
Copied
What is the javascript code for your plugin that doesn't work correctly?
Copy link to clipboard
Copied
There is no any files in my pluginUI expecting swf and manifest
Please find it.
Thanks & Regards
Kundan
Copy link to clipboard
Copied
You should have an mxml file that is used to generate the swf file.
Copy link to clipboard
Copied
yes so how I will migrate this for cloud version ?
Please Assist.
Regards
kundan
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Please find the click event code inside the mxml file
Please find it.
Regards
Kundan
Copy link to clipboard
Copied
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.....
}
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
_loc_2 perhaps?
Copy link to clipboard
Copied
Data object was declared and defined just above in my sample.
Like Leo told you before, this should be _loc_2 in your sample.
Copy link to clipboard
Copied
Find more inspiration, events, and resources on the new Adobe Community
Explore Now