Last active
December 20, 2015 12:59
-
-
Save chrisntr/6135478 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.InvalidProgramException: Invalid IL code in BibleGatewaySharpDemo.BibleGatewayAsyncViewController:<UpdateBrowser>m__1 (System.Threading.Tasks.Task`1<string>): IL_0008: stfld 0x0400000d | |
at System.Threading.Tasks.TaskActionInvoker+ActionTaskInvoke`1[System.String].Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:199 | |
at System.Threading.Tasks.Task.InnerInvoke () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:505 | |
at System.Threading.Tasks.Task.ThreadStart () [0x00097] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:406 | |
at --- End of stack trace from previous location where exception was thrown --- | |
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62 | |
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00043] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs:60 | |
at BibleGatewaySharpDemo.BibleGatewayAsyncViewController+<UpdateBrowser>c__async0.MoveNext () [0x00055] in /Users/pierce/Desktop/Dropbox/Coding/Projects/BibleGatewaySharp/BibleGatewaySharpDemo/BibleGatewayAsyncViewController.cs:41 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
using System.Threading.Tasks; | |
using BibleGatewaySharp; | |
using BigTed; | |
namespace BibleGatewaySharpDemo | |
{ | |
public class BibleGatewayAsyncViewController : UIViewController | |
{ | |
UIWebView Browser; | |
public BibleGatewayAsyncViewController () | |
{ | |
} | |
public override void ViewDidLoad () | |
{ | |
base.ViewDidLoad (); | |
Browser = new UIWebView (); | |
Browser.Frame = new RectangleF (0, 0, View.Bounds.Width, View.Bounds.Height); | |
View.Add (Browser); | |
} | |
public override void ViewDidAppear (bool animated) | |
{ | |
base.ViewDidAppear (animated); | |
UpdateBrowser (); | |
} | |
public async void UpdateBrowser () | |
{ | |
BTProgressHUD.Show ("Downloading Verse"); | |
var bg = new BibleGatewayAsync (); | |
var myResult = await bg.GetVerseTextAsync ("Genesis 1:1-5"); | |
Browser.LoadHtmlString (myResult.Result, null); | |
BTProgressHUD.Dismiss (); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment