Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

UpdateIsEnabled Custom ViewCell error

$
0
0

I have a custom ViewCell that is disabled until another field has data in it. I have a Converter that sets the IsEnabled value based on it not being null. That converter seems to run fine and so does all of the code I have written but then it blows up with a NullReferenceException at on the UpdateIsEnabled in the ViewCellRenderer. Is this a bug and is there a workaround in the ViewCellRenderer? StackTrace below:

2016-01-15 13:44:44.078 MyMobileAppiOS[87782:19727632]
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at Xamarin.Forms.Platform.iOS.ViewCellRenderer.UpdateIsEnabled (Xamarin.Forms.Platform.iOS.ViewTableCell cell, Xamarin.Forms.ViewCell viewCell) [0x00007] in :0
at Xamarin.Forms.Platform.iOS.ViewCellRenderer.ViewCellPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x0002a] in :0
at (wrapper delegate-invoke) :invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00012] in :0
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindablePropertyContext context, System.Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent) [0x0
00fb] in :0
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes) [0x0014b] in :0
at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, Boolean fromTarget) [0x0020b] in :0
at Xamarin.Forms.BindingExpression.Apply (Boolean fromTarget) [0x0003e] in :0
at Xamarin.Forms.BindingExpression+BindingExpressionPart.b__38_0 () [0x00000] in :0
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/2377/73229919/source/maccore/src/Foundation/NSAction.cs:163
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /U
sers/builder/data/lanes/2377/73229919/source/maccore/src/UIKit/UIApplication.cs:77
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/2377/73229919/source/maccore/src/UIKit/UIApplication.cs:61
at MyMobileApp.iOS.Application.Main (System.String[] args) [0x0000d] in C:\Source\XamarinApps\MyMobileApp\MyMobileApp\MyMobileApp.iOS\Main.cs:24
2016-01-15 13:44:44.078 MyMobileAppiOS[87782:19727632] Unhandled managed exception:
Object reference not set to an instance of an object (System.NullReferenceException)
at Xamarin.Forms.Platform.iOS.ViewCellRenderer.UpdateIsEnabled (Xamarin.Forms.Platform.iOS.ViewTableCell cell, Xamarin.Forms.ViewCell viewCell) [0x00007] in :0
at Xamarin.Forms.Platform.iOS.ViewCellRenderer.ViewCellPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x0002a] in
:0
at (wrapper delegate-invoke) :invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00012] in :0
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindablePropertyContext context, System.Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent) [0x000fb] in :0
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes) [0x0014b] in :0
at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, Boolean fromTarget) [0x0020b] in :0
at Xamarin.Forms.BindingExpression.Apply (Boolean fromTarget
) [0x0003e] in :0
at Xamarin.Forms.BindingExpression+BindingExpressionPart.b__38_0 () [0x00000] in :0
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/2377/73229919/source/maccore/src/Foundation/NSAction.cs:163
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/2377/73229919/source/maccore/src/UIKit/UIApplication.cs:77
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/2377/73229919/source/maccore/src/UIKit/UIApplication.cs:61
at MyMobileApp.iOS.Application.Main (System.String[] args) [0x0000d] in C:\Source\XamarinApps\MyMobileApp\MyMobileApp\MyMobileApp.iOS\Main.cs:24


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>