Follow me on Twitter at Twitter.com/wbm
FYI, I'm blogging most of my stuff over at More Wally now.
You might want to add my rss feed to your reader at:http://morewally.com/cs/blogs/wallym/rss.aspx
Web.Net.WebRequest() class in Atlas - Wallace B. McClure

Wallace B. McClure

All About Wally McClure - The musings of Wallym on Web, HTML5, Mobile, Xamarin.iOS, Xamarin.Android, and Windows Azure.

News

Visual Studio Magazine Column Personal Blog

.NET

Book Authors

Business

Family

Friends

Georgia Tech Bloggers

Personal

Archives

Web.Net.WebRequest() class in Atlas

I was talking to Wilco a while back and he said that the Completed event on the Web.Net.WebRequest() object takes two paramaters, just like in .NET.  I wrote the code below to test it out and it seems to work properly.  Now I can see which object instance actually instantiated the event.

var request;
function MakeCall()
{
request =
new Web.Net.WebRequest();
var url = Web.Net.WebRequest.createUrl("http://.......", null);
request.set_url(url);
request.completed.add(RequestCompleted);
request.timeout.add(RequestTimeOut);
request.invoke();
}

function RequestCompleted(objSender, evArgs)
{
var obj = request.get_response();
debug.dump(evArgs, "event arguments", true);
debug.dump(objSender,
"object sender", true);
}

Comments

No Comments