Remoting: Making RelayResponder act like Delegate

Posted on Friday 13 May 2005

Before there was mx.utils.Delegate, there was mx.rpc.RelayResponder, which does sort of the same thing but in the context of Remoting callbacks. It's used like so:


var pc:PendingCall = service.doStuff();
pc.responder = new RelayResponder(this, "handleOk", "handleRemotingError");
 

Well I really like mx.utils.Delegate and I think the syntax would benefit from being consistent across the two. So I've created a new class, mx.rpc.Relay, which works like so:


var pc:PendingCall = service.doStuff();
pc.responder = Relay.create(this, handleOk, handleRemotingError);
 

The two benefits are more consistency with Delegate and syntax errors if you misspell the function name. Get mx.rpc.Relay here.


WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 145)]
SELECT * FROM wp_comments WHERE comment_post_ID = '96' AND comment_approved = '1' ORDER BY comment_date

No comments have been added to this post yet.

Leave a comment




Your e-mail address is never displayed. If you run into issues with SpamKarma blocking you, email me at $patrick->5etdemi(com)


RSS feed for comments on this post | TrackBack URI