Hello.
Recently I see many red errors in mxml files like "Duplicate JavaScript decralation". I disabled the corresponding checkbox in validator settings but errors didn't dissapere. How to disable javascript validator in mxml files?
Thanks.
Hi Andrey,
Could you please provide a screenshot or (even better) a code snippet?
Thanks,
Kirill
Code is like this - some event subscription in mxml and event handler in script tag.
<fx:Script>
function dataChangedHandler(event):void {
...
}
</fx:Script>
<comps:Comp dataChanged="dataChangedHandler(event)"
p.s. Now I tried to enclose method in braces: dataChanged="{dataChangedHandler(event)}" and all errors are disappeared. Even after I removed braces again.
Cannot reproduce so far.
Does it happen right after you open the file in editor? Does it happen after you use Undo? Does it dissapear after any file modification, or just after you insert curly brackets?
Yes, after curly brackets. Maybe some code validation happened in editor.
Does it happen right after you open the file in editor? Does it happen after you use Undo?
No undo. File editor was opened long time ago.
Yes. Now I have noticed that it happens after file is opened in editor.
Does it happen every time for the particular file?
No, it happens for different mxml files sometimes.
Thanks Andrey, we'll investigate the problem.