I've created a custom component and declared a skin part:
[SkinPart (required="true")]
public var label:Label;
During component initialization I set label.text
to 'foo'
:
protected function init():void {
label.text = 'foo'; //This line fails silently
bar();
}
The function gets called when label is null and weird things happen:
label.text = 'foo';
fails silently: no Exceptions are thrown, the console view displays nothing.bar();
is never executed.
I expect the app to produce a fatal error and exit but it doesn't. Why does setting a property of a null reference fail silently?
I've read about silent data binding errors here but label.text = 'foo';
doesn't bind anything. SDK version is 4.6.