Hi
I have a hard time understanding why the following won't work.  I started
with the following xaml:

<UserControl x:Class="System.Windows.Controls.UserControl"
 xmlns="http://schemas.microsoft.com/client/2007";
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml";>

  <Grid x:Name="layout_root" Background="White">
    <TextBlock x:Name="message" FontSize="10" />
  </Grid>

 </UserControl>

and in the initialize method of App I've got the following code

@root = Application.current.load_root_visual(UserControl.new, "app.xaml")
request = Net::WebClient.new
request.download_string_completed do |sender, args|
      @root.find_name("message").text = "Completed"
end
request.download_string_async Uri.new("http://google.com";)


This works but as you can see nothing interesting happens except for that
download_string_completed is called because the message textbloc shows
Completed

@root = Application.current.load_root_visual(UserControl.new, "app.xaml")
request = Net::WebClient.new
request.download_string_completed do |sender, args|
      @root.find_name("message").text = *args.result*
end
request.download_string_async Uri.new("http://google.com";)

But as soon as I ask the args for the result nothing happens anymore. it
must be an exception somewhere but I have no idea as to where I can find the
exception or stacktrace because all it does is show me a blank page with all
layout removed and the IronRuby Console in the bottom is still there but it
is disabled too.

So how do I get to that error?

---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to