P986
Using ActionScript expressions in curly braces
在{}中使用ActionScript表達式
Using an E4X expression in curly braces
在{}中使用E4X表達式
A binding expression in curly braces or an <mx:Binding> tag can contain an ECMAScript for
XML (E4X) expression when the source of a binding is a bindable property of type XML.
當綁定的屬性是XML類型時,在{}中的綁定表達式或者在<mx:Binding>標簽中可以包含一個ECMAScript for XML的表達式。
當使用E4X表達式時,必須對XML熟悉。
P987頁的例子應該試一下,看看當xml中有兩個description時,其輸出結果會如何?
當有兩個description時,會迭代將description輸出,不過需要注意的是輸出結果格式如下:
???<description>Big Screen Television</description>
???<description>DVD Player</description>
Using ActionScript functions in curly braces
在{}中使用ActionScript函數
If the inString property is not passed as an argument, but is referenced from within the
function, the function does not get invoked when the inString property changes.
如果inString屬性沒有作為參數進行傳遞,而是在函數內部被引用了,當inString屬性發生變化時,函數是不會被調用的。
以上三種情況的例子在文檔中有詳細的描述,就不在這里貼出了。
最近忙于項目上線,只能每天少看一點了:(