Enterprise APP
The "in" operator 본문
Juten Tach,
i work with Actionscript for some time now, but i wasn’t aware of that little thing. You can use “in” for checking, if an attribute/field exists in an object, like so:
package { import flash.display.Sprite; public class Test extends Sprite { public function Test() { var myObject:Object = {name: "foo", nothing: "bar"}; trace("name" in myObject); // true trace("anything" in myObject); // false } } }
'Flex General > Tips' 카테고리의 다른 글
Flex: Using Regular Expressions For RealTime Filtering (0) | 2010.05.26 |
---|---|
10 Things A Good Flex Developer Should Know (0) | 2010.05.26 |
No grammar constraints (DTD or XML schema) detected for the document (0) | 2010.05.26 |
Flash Builder 4: The easiest way to create a combined Flex/Java Project (0) | 2010.05.26 |
Spark : List & RadioButton itemRenderer (0) | 2010.05.21 |
Comments