Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Cross-thread call 'fix' #5

Merged
merged 1 commit into from

2 participants

@conceptdev

Yo! Was checking out the datagrid after irc discussion; but was getting the new MonoTouch (5.3.2) 'cross-thread' warning. This fixed it... HTH

@conceptdev

Using Monotouch: 5.3.2, in debug mode it looks for cross-thread calls. This was triggering one for me.

@Clancey Clancey merged commit e58a806 into Clancey:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 ClanceysLib/Navigation/NavIcon.cs
View
8 ClanceysLib/Navigation/NavIcon.cs
@@ -120,7 +120,13 @@ private void loadOnThread()
loading = new MBProgressHUD();
loading.Show(true);
}
- modalview = ModalView == null ? null : ModalView();
+ // UIKit Consistency error: you are calling a UIKit method that can only be invoked from the UI thread.
+ //modalview = ModalView == null ? null : ModalView();
+ if (ModalView == null)
+ modalview = null;
+ else
+ InvokeOnMainThread(() => {modalview = ModalView();});
+
InvokeOnMainThread(delegate {loadComplete();});
}
}
Something went wrong with that request. Please try again.