Script Editor for Grapical Object\'s Extended Events Obfuscates Extra Code

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
2 posts • Page 1 of 1
ChristianGoehring
Posts:14
Joined: Fri Feb 24, 2017 9:29 am

Script Editor for Grapical Object\'s Extended Events Obfuscates Extra Code

Post by ChristianGoehring »

Hello,

Within the Script for an Graphical Object's Extended Events (for example, the WebView ewo's "urlChanged" event), any extra code besides the function (for example a #uses directive or enum declaration) is removed by the Script Editor.

I am using WinCC 3.15 P05 on Win 7. You can recreate this behaviour by the following steps:

1. Create a new panel
2. Place a Webview Ewo within the panel
3. Within the properties window, open "extended"
4. Within the "events" section of the window, click on "Open Script Editor" for the "urlChanged" event
5. Paste the following code:

Code: Select all

enum TestEnum
{
  Value1, Value2
};

urlChanged(string url)
{
  DebugTN("Does it still exist? " + (int)TestEnum::Value1);
}
6. Save the script and close the Script Editor
7. Open the script for this event again

The following code is now within the script:

Code: Select all

urlChanged(string url)
{
  Value1, Value2
};

urlChanged(string url)
{
  DebugTN("Does it still exist? " + (int)TestEnum::Value1);
}
- There is different behaviour for different declarations or directives before the function
- Within the standard events with main-method, it does not obfuscate or delete code

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Script Editor for Grapical Object\'s Extended Events Obfuscates Extra Code

Post by mkoller »

Obviously a bug.
In general the "extended" scripts do not allow to keep anything else but the code of the given function.

2 posts • Page 1 of 1