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);
}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);
}
- Within the standard events with main-method, it does not obfuscate or delete code