MKCoordinateRegionMakeWithDistance is unavailable on MonoTouch? - xamarin.ios

I am trying to convert a Map example from objective-c to MonoTouch but the MKCoordinateRegionMakeWithDistance isn't wrapped in .NET as far as I managed to find.
This issue has been marked as resolved by the MonoTouch team, so where is it? :-)
https://bugzilla.novell.com/show_bug.cgi?id=629743

It's there in MonoTouch 4.
using MonoTouch.MapKit;
...
var region = MKCoordinateRegion.FromDistance(center, latmeters, lngmeters);
Hope this helps.

Related

AutoMapper version 5.0.0-beta-1 - Created Mapper shows exceptions

I updated automapper package today and it got updated to 5.0.0-beta and i immediately got few build errors. Going through the latest changes in their wiki page i found that CreateMap is deprecated. So i followed their instruction and here is my code below.
The created mapper shows these exception about which i have no clue. I am not able to continue further. Should i do something extra with this new version of AutoMapper? Any help would be greatly appreciated. My POCO classes are just regular ones with int and strings.
You can just create a new Mapper instance now:
var mapper = new Mapper(config);
builder.RegisterInstance(mapper).As<IMapper>();
Or, if you prefer the old static way, just use Mapper.Initialize().

coded ui waitforcontrolready not working on VSTT2013 but worked on VSTT2010

I meet the following issues after migration from VSTT2010 to 2013:
all my ....WaitForControlReady(3000); throw exception object reference not defined to object reference
e.g:
UIMap.UIIdentificationWindowWindow.UIIdentificationDocument4.WaitForControlReady(3000);
Is waiting for a popup to be displayed
MonNavigateur.WaitForControlReady();
with:
public static BrowserWindow MonNavigateur; declared in the class
and: MonNavigateur = BrowserWindow.Launch(new Uri(sAppConfigExtranetUri)); in MyTestInitialize() method
I worked like a charm in VSTT2010 ;(
The temporary workaround used is to replace all my WaitForControlReady(); with a not satisfying Playback.Wait(x000);
Anyone has an idea to solve this problem please?
Make sure you upgrade your reference assemblies to the latest version. WaitForControlReady() should be a part of the Microsoft.VisualStudio.TestTools.UITesting assembly. Version 12.0 would be required to run in VS2013.

executequeryasync method missing

I have a quite large now program using [Sharepoint] 2013 fondation and CSOM. I use clientcontext.executequery with success.
I would like to work with executequeryasync but my "clientcontext" does not present that method neither in intellisense, nor accepted at compile time if I type it directly. Only executequery is present.
If I "f12" on my clientcontext, I fall in the SP ClientContext class which has an executequery but no executequeryasync.
.Net 4.5 and 4.5.1, same result
What am I missing ?
Thanks a lot !
Do you make sure the SharePoint script file 'sp.js' is loaded before your code runs?
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', yourFunction);
The asynchronous version is only available in Silverlight. See the mentioned assemblies in the corresponding MSDN article.

Unknown member 'SortDescriptions' on element 'CollectionViewSource'

This is a real newbie question. I feel dumb that I have not figured it out yet. I am trying to add a sort to my CollectionViewSource in my Win 8 App.
<CollectionViewSource
x:Name="itemsViewSource"
x:Key="cvs"
Source="{Binding Items}">
<CollectionViewSource.SortDescriptions>
<scm:SortDescription PropertyName="PubDate" Direction="Ascending"/>
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
I have the following namespaces declared:
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
But I get the error "Unknown member 'SortDescriptions' on element 'CollectionViewSource'" when I try to build. What am I missing?
I believe that CollecitonViewSource in WinRT does not have SortDescription. You may have to order the Items instead.
This link might help as well.
A WinRT CollectionView class with Filtering and Sorting

ObjectQuery extensions from managed C++/CLI

I'm trying to move a project over to using Entity Framework, but to make it more fun, the project is in C++/CLR.
I've got a query
ObjectQuery<myData::Facility^>^ facQ = myContext->FacilitySet;
and I want to do this
int n = facQ.Count()
But I can't because c++ doesn't recognise extension methods using C# syntax. facQ->Count() doesn't work.
Using C# extension methods from managed C++/CLI shows the answer for user-defined extensions; but in this case, the extension is part of the .NET framework http://msdn.microsoft.com/en-us/library/bb349034%28v=vs.90%29.aspx.
Any ideas?
(I'm using visual studio 2008, and .NET 3.5).
System::Data::Objects::ObjectQuery implements IEnumerable<T>. The Count() method you see in C# is from the System::Linq::Enumerable class.
using namespace System::Linq;
int n = Enumerable::Count(facQ);
Also see this answer, which shows a couple examples of calling other extension methods in that class.

Resources