RE: [flexcoders] hasEventListener() on null object causes silent failure and exit from block

2008-04-02 Thread Alex Harui
nkinbeard Sent: Wednesday, April 02, 2008 7:25 AM To: flexcoders@yahoogroups.com <mailto:flexcoders@yahoogroups.com> Subject: [flexcoders] hasEventListener() on null object causes silent failure and exit from block This seems like a bug to me. In the following code if dp is null, the

Re: [flexcoders] hasEventListener() on null object causes silent failure and exit from block

2008-04-02 Thread Ben Clinkinbeard
n? Those have catch blocks. > > > -- > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *ben.clinkinbeard > *Sent:* Wednesday, April 02, 2008 7:25 AM > *To:* flexcoders@yahoogroups.com > *Subject:* [flexcoders] hasEventListener(

RE: [flexcoders] hasEventListener() on null object causes silent failure and exit from block

2008-04-02 Thread Alex Harui
25 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] hasEventListener() on null object causes silent failure and exit from block This seems like a bug to me. In the following code if dp is null, the trace will not be executed. function greatFun():void { if( dp.hasEventListener(

[flexcoders] hasEventListener() on null object causes silent failure and exit from block

2008-04-02 Thread ben.clinkinbeard
This seems like a bug to me. In the following code if dp is null, the trace will not be executed. function greatFun():void { if( dp.hasEventListener( "foo" ) ) { // do stuff } trace( "WTF" ); } It should either throw a RTE or just evaluate to false, shouldn't it? Thanks, Ben