If I write this code in the init script of a panel element
// set text
main()
{
this.
this.enabled = TRUE;
}
then I get this error message when opening the panel:
WCCOAui56:WCCOAui (56), 2016.09.14 14:28:00.780, CTRL, WARNING, 76, Invalid argument in function,
WCCOAui56: Module: Vision_37
WCCOAui56: Panel: C:\\Users\\kr\\BmsProjectManager\\Standard\\panels\\Plant\\Sil\\STO3.pnl []
WCCOAui56: Object: 1777 named: "CascadeButton3" of type: CASCADE_BUTTON
WCCOAui56: Script: Initialize
WCCOAui56: Line: 5, this
which is valid, because "this." makes no sense.
I would have expected that the GEDI's script editor does not tell me that this code is invalid though.
Is that a bug or is there some valid reason for that behaviour?
Panel Script syntax checker allows \"this.\"
- RudiKreiner
- Posts:198
- Joined: Mon May 16, 2011 2:10 pm
Panel Script syntax checker allows \"this.\"
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: Panel Script syntax checker allows \"this.\"
It's not a bug, since the "dot notation" can be much deeper, e.g. a.b.c.foo()
This is used e.g. if an activeX shape on windoze has sub / sub-sub objects.
So syntactically this is correct (the script editor just checks syntax).
This is used e.g. if an activeX shape on windoze has sub / sub-sub objects.
So syntactically this is correct (the script editor just checks syntax).