mrozmanith / flexcairngorm

Automatically exported from code.google.com/p/flexcairngorm
0 stars 0 forks source link

notifyCaller() will always pass an argument #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
If you call "notifyCaller()" with no value, the handler will receive an
argument.

consider:

public function bob() : void
{
var handler : CallBacks = new Callbacks( onResult_bob );
var event : MyEvent = new MyEvent( MyEvent.EVENT , handler ).dispatch();
}

--the notify caller from the command is just:
notifyCaller();

--if the handler is:
onResult_bob() : void {}
--an error is thrown as an argument is passed
--if the handler is:
onResult_bob( result : * ) : void {}
-- no error is thrown, but the value of "result" is null

Let me know if you need more info from me

Cheers,

David Harris
djohnsmarie@gmail.com

Original issue reported on code.google.com by djohnsma...@gmail.com on 7 Aug 2008 at 4:12