Created
May 12, 2010 04:51
-
-
Save troygilbert/398220 to your computer and use it in GitHub Desktop.
Throws null ref exception
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
public class MyCustomControl | |
{ | |
protected var someDependency:Object; | |
[Bindable] | |
public function get someProperty():Object { return null; } | |
public function set someProperty(value:Object):void | |
{ | |
someDependency.someMethod(); // throws a null ref exception that gets swallowed | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml"> | |
<MyCustomControl someProperty="{this}"/> | |
</mx:Box> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment