Disable warning in only one place

In MXML code

<fx:Script>
   public var data:ArrayCollection = new ArrayCollection();
</fx:Script>
<s:DataGroup dataProvider="{data}" />

I get a warning:

Data binding cannot detect assignments to "data"

I know that the data provider in this case will never be changed, and in this case you want to disable this warning, but I do not want to completely disable it, -show-binding-options=falsein all projects it is not an option.

How to disable the warning in only one place? Disabling for the whole file is not so good, but acceptable.

+3
source share
2 answers

How to just change a variable data? Sort of:

<fx:Script>
   [Bindable]
   public var data:ArrayCollection = new ArrayCollection();
</fx:Script>
<s:DataGroup dataProvider="{data}" />
+2
source

<fx:Script></fx:Script> <fx:Declarations></fx:Declarations>. , MXML, . :

<fx:Declarations>
    <s:ArrayCollection id="data" />
</fx:Declarations>

<s:DataGroup dataProvider="{data}" />

, , ActionScript MXML. ​​, , ActionScript [Bindable] MXML.

BTW, - ActionScript MXML. , ActionScript MXML <NameOfComponent>Includes.as.

0

Source: https://habr.com/ru/post/1788005/


All Articles