You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems to fail when my view models vm.RefreshCommand.Execute(null) gets called
System.NullReferenceException: Object reference not set to an instance of an object.
Also,
Not sure how I can eventually call the GetGameParticipantsAsync(Game game) method I've created in the RefreshCommand because it looks like it only has a getter and no setter.
The text was updated successfully, but these errors were encountered:
@schnabs Are you still having an issue with this? I had the same problem but I got it to work after a couple hours of debugging. It turns out that I needed to use the same client I initialized before I registered my tables on app start, inside the custom data store.
public override void Initialize()
{
if (serviceClient == null)
{
//using the client that I initialized on app start
serviceClient = App.client;
//serviceClient = ServiceLocator.Instance.Resolve();
}
}
public virtual void Initialize(IEasyMobileServiceClient client)
{
//using the client that I initialized on app start
serviceClient = App.client;
//serviceClient = client;
}
Otherwise, this get call for the table will return null: IMobileServiceSyncTable<Team> table; protected IMobileServiceSyncTable<Team> Table { get { return table ?? (table = serviceClient.MobileService.GetSyncTable<Team>()); } }
I've created and registered a Table Data Store.
public class ParticipantsViewModel : BaseAzureViewModel<Participant> {...}
and replaced
Seems to fail when my view models vm.RefreshCommand.Execute(null) gets called
System.NullReferenceException: Object reference not set to an instance of an object.
Also,
Not sure how I can eventually call the GetGameParticipantsAsync(Game game) method I've created in the RefreshCommand because it looks like it only has a getter and no setter.
The text was updated successfully, but these errors were encountered: