I use {} around variables in MXML, not understanding what they are for. Now I need to know if I should use it around a variable .. what does it do?
example: <mx:label text="{variable}"/>
<mx:label text="{variable}"/>
This is a binding !,In this case, it means that the contents of "variable" will be displayed in the label text; if you change the value of "variable", it will also change the text displayed by the label.
As stated above, this will bind the variable to this object.
variable , , variable , . , , , Bindable :
variable
Bindable
<mx:Script> ... [Bindable] private variable:String = "Label"; ... </mx:Script>
{} . , [Bindable] :
[Bindable] public var s:String;
.
, , ArrayCollection, , ArrayCollection IList ICollectionView, , , .
As mentioned several times, this is really data binding. There is a good adobe article on using data bindings in flex .
Source: https://habr.com/ru/post/1711177/More articles:SQL Pivot based on the value between two columns - sqlHow to make tab name editable in C #? - c #Where do you put cfimport - coldfusionЗагрузка изображения перед переключением фона div в jquery - javascriptHardware for I / O to external devices - interfaceCSS box "flow" / stacking (see screenshot) - cssWhat are the main benefits of migrating to DLR for my scripting language? - .netJava2C # translation: public methods in interfaces in C # - javaCan you write Cocoa applications using HTML / CSS and Javascript? - javascriptWhat is the most efficient way to create an order count by hour, day, month in SQL Server 2005? - sqlAll Articles