Skip to content

Instantly share code, notes, and snippets.

@troygilbert
Created May 12, 2010 04:51
Show Gist options
  • Save troygilbert/398220 to your computer and use it in GitHub Desktop.
Save troygilbert/398220 to your computer and use it in GitHub Desktop.
Throws null ref exception
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
}
}
}
<?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