I have a panel containing several types of reference panels. Within the panels, functions access graphical objects of other reference panels via the nomenclature described in the documentation. The problem is that any function declared as "public" within the ref panel's ScopeLib "hides" these other objects and causes a warning message and I cannot access the shape object:
WCCOAui (1), 2017.11.24 13:17:09.151, CTRL, WARNING, 13/uim,
Module: _QuickTest_
Panel: D:\\Projects\\local\\Playground\\panels\\ref_parent.pnl []
Object: 1 named: "RECT" of type: RECTANGLE
In reference: ref1.pnl Group: 0 named: "ref1"
Script: Initialize
Line: 3, In "setValue()": Object "ref2.RECT" does not exist
If you declare all methods in the ScopeLib as private, the problem dissappears.
You can recreate the problem following these steps:
1. Create a panel "ref1.pnl".
2. Add a rectangle and name it "RECT".
3. Within the rectangle's Initialize script, define the following:
Code: Select all
main()
{
setValue("ref2.RECT", "backCol", "SiemensPetrol");
}Code: Select all
public void extra()
{
DebugTN("I am public");
}6. Similar to the first panel, add a rectangle and name it "RECT".
7. Within this rectangle's "Initialize" script, implement the following:
Code: Select all
main()
{
setValue("ref1.RECT", "backCol", "SiemensPetrol");
}9. Launch it in Quicktest and observe the warning message and the fact that only one rectangle changes color.
I am using WinCC OA 3.15 P05