2

After updating my project to Unified API and MVVM Cross 3.5 stable ,I am getting the following warring message in the console for all button bindings...

I am binding like this.

try {
 this.AddBindings(
  new Dictionary < object, string > () {

   //all the command controls - such as buttons
   {
    btnXmit,
    "TouchUpInside cmdXmitClicked"
   }, {
    btnCancel,
    "TouchUpInside cmdBack"
   },

  });
} catch (Exception error) {

}

at

Cirrious.CrossCore.WeakSubscription.MvxWeakEventSubscription2[System.Windows.Input.ICommand,System.EventArgs]..ctor (ICommand source, System.Reflection.EventInfo sourceEventInfo, System.EventHandler1 targetEventHandler) [0x00028] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/CrossCore/Cirrious.CrossCore/WeakSubscription/MvxWeakEventSubscription.cs:52 at Cirrious.CrossCore.WeakSubscription.MvxCanExecuteChangedEventSubscription..ctor (ICommand source, System.EventHandler1 eventHandler) [0x00000] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/CrossCore/Cirrious.CrossCore/WeakSubscription/MvxCanExecuteChangedEventSubscription.cs:21 at Cirrious.CrossCore.WeakSubscription.MvxWeakSubscriptionExtensionMethods.WeakSubscribe (ICommand source, System.EventHandler1 eventHandler) [0x00003] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/CrossCore/Cirrious.CrossCore/WeakSubscription/MvxWeakSubscriptionExtensionMethods.cs:68 at Cirrious.MvvmCross.Binding.Touch.Target.MvxUIControlTouchUpInsideTargetBinding.SetValueImpl (System.Object target, System.Object value) [0x00045] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/Cirrious/Cirrious.MvvmCross.Binding.Touch/Target/MvxUIControlTouchUpInsideTargetBinding.cs:74 at Cirrious.MvvmCross.Binding.Bindings.Target.MvxConvertingTargetBinding.SetValue (System.Object value) [0x000bd] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/Cirrious/Cirrious.MvvmCross.Binding/Bindings/Target/MvxConvertingTargetBinding.cs:64 at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (System.Object value) [0x00036] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/Cirrious/Cirrious.MvvmCross.Binding/Bindings/MvxFullBinding.cs:162 2015-02-16 17:48:14.433 RemoteInspectioniOS[3506:119564] MvxBind: Error: 212.37 Problem seen during binding execution for binding TouchUpInside for cmdBack - problem ArgumentNullException: missing source event info in MvxWeakEventSubscription Parameter name: sourceEventInfo at Cirrious.CrossCore.WeakSubscription.MvxWeakEventSubscription2[System.Windows.Input.ICommand,System.EventArgs]..ctor (ICommand source, System.Reflection.EventInfo sourceEventInfo, System.EventHandler1 targetEventHandler) [0x00028] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/CrossCore/Cirrious.CrossCore/WeakSubscription/MvxWeakEventSubscription.cs:52 at Cirrious.CrossCore.WeakSubscription.MvxCanExecuteChangedEventSubscription..ctor (ICommand source, System.EventHandler1 eventHandler) [0x00000] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/CrossCore/Cirrious.CrossCore/WeakSubscription/MvxCanExecuteChangedEventSubscription.cs:21 at Cirrious.CrossCore.WeakSubscription.MvxWeakSubscriptionExtensionMethods.WeakSubscribe (ICommand source, System.EventHandler1 eventHandler) [0x00003] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/CrossCore/Cirrious.CrossCore/WeakSubscription/MvxWeakSubscriptionExtensionMethods.cs:68 at Cirrious.MvvmCross.Binding.Touch.Target.MvxUIControlTouchUpInsideTargetBinding.SetValueImpl (System.Object target, System.Object value) [0x00045] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/Cirrious/Cirrious.MvvmCross.Binding.Touch/Target/MvxUIControlTouchUpInsideTargetBinding.cs:74 at Cirrious.MvvmCross.Binding.Bindings.Target.MvxConvertingTargetBinding.SetValue (System.Object value) [0x000bd] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/Cirrious/Cirrious.MvvmCross.Binding/Bindings/Target/MvxConvertingTargetBinding.cs:64 at Cirrious.MvvmCross.Binding.Bindings.MvxFullBinding.UpdateTargetFromSource (System.Object value) [0x00036] in /Volumes/WORKSPACE/Workspace/V3.5/framework/framework/MvvmCross-3/Cirrious/Cirrious.MvvmCross.Binding/Bindings/MvxFullBinding.cs:162

Artiom
  • 7,694
  • 3
  • 38
  • 45
Suriya
  • 23
  • 2

1 Answers1

6

You'll need to create a LinkerPleaseInclude.cs file with the following code:

public class LinkerPleaseInclude
{
    public void Include(ICommand command)
    {
        command.CanExecuteChanged += (s, e) => { if (command.CanExecute(null)) command.Execute(null); };
    }
}

EDIT (per my comment):

enter image description here

enjayem
  • 941
  • 8
  • 21