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
I've got both ItemsSource and SelectedItem bound via XAML, with TwoWay binding set on the SelectedItem. As soon as I change the selected item on iOS (just move the scroller), it throws a Null Reference Exception.
My ItemsSource is a List of strings (only three items)
I stepped through your BindablePicker code and couldn't find any obvious flaws leading up to the exception, but I have little knowledge of what's happening under the iOS hood.
The stacktrace shows; at Xamarin.Forms.Platform.iOS.PickerRenderer.UpdatePickerFromModel (Xamarin.Forms.Platform.iOS.PickerRenderer+PickerSource s) [0x0002f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PickerRenderer.cs:111 at Xamarin.Forms.Platform.iOS.PickerRenderer+PickerSource.Selected (UIKit.UIPickerView picker, System.nint row, System.nint component) [0x00054] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PickerRenderer.cs:180 at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/3818/3983064a/source/xamarin-macios/src/UIKit/UIApplication.cs:79 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/3818/3983064a/source/xamarin-macios/src/UIKit/UIApplication.cs:63 at AttendanceApp.iOS.Application.Main (System.String[] args) [0x00001] in D:\Sources\attendance\AttendanceApp.iOS\Main.cs:12
I should also probably mention I'm using the preview bits for Xamarin.Forms. (I have no choice as UWP is broken badly in the 'stable' version). On 2.3.3.163-pre3
-Edit
Just tested with mixed assemblies... downgraded the iOS project back to stable Xamarin.Forms and it still throws the error.
The text was updated successfully, but these errors were encountered:
Android and iOS fire -SelectedIndexChanged- events in different moments.
I was reassigning the picker in Android for a redraw causing the null reference in iOS.
iOS keeps firing the Index Changed while scrolling the choices
I think that is an issue of iOS and is tracked by Xamarin. Yes, found it here and should have found its way in to the later versions of Forms. Which version are you using and could you produce a stack trace?
Also this should be merged into Forms. See this PR
I've got both ItemsSource and SelectedItem bound via XAML, with TwoWay binding set on the SelectedItem. As soon as I change the selected item on iOS (just move the scroller), it throws a Null Reference Exception.
My ItemsSource is a List of strings (only three items)
I stepped through your BindablePicker code and couldn't find any obvious flaws leading up to the exception, but I have little knowledge of what's happening under the iOS hood.
The stacktrace shows;
at Xamarin.Forms.Platform.iOS.PickerRenderer.UpdatePickerFromModel (Xamarin.Forms.Platform.iOS.PickerRenderer+PickerSource s) [0x0002f] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PickerRenderer.cs:111 at Xamarin.Forms.Platform.iOS.PickerRenderer+PickerSource.Selected (UIKit.UIPickerView picker, System.nint row, System.nint component) [0x00054] in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\Renderers\PickerRenderer.cs:180 at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/3818/3983064a/source/xamarin-macios/src/UIKit/UIApplication.cs:79 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/3818/3983064a/source/xamarin-macios/src/UIKit/UIApplication.cs:63 at AttendanceApp.iOS.Application.Main (System.String[] args) [0x00001] in D:\Sources\attendance\AttendanceApp.iOS\Main.cs:12
I should also probably mention I'm using the preview bits for Xamarin.Forms. (I have no choice as UWP is broken badly in the 'stable' version). On 2.3.3.163-pre3
-Edit
Just tested with mixed assemblies... downgraded the iOS project back to stable Xamarin.Forms and it still throws the error.
The text was updated successfully, but these errors were encountered: