Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Xamarin.Mac] RadioButton : InvalidCastException on click #12880

Closed
Suryask0 opened this issue Nov 17, 2020 · 0 comments · Fixed by #12882
Closed

[Xamarin.Mac] RadioButton : InvalidCastException on click #12880

Suryask0 opened this issue Nov 17, 2020 · 0 comments · Fixed by #12882
Assignees
Labels
a/radiobutton 🔘 e/1 🕐 1 in-progress This issue has an associated pull request that may resolve it! p/macOS t/bug 🐛
Projects

Comments

@Suryask0
Copy link

Description

In the XF 5.0 pre release 4, clicking on the radio button would throw an InvalidCastException,

System.InvalidCastException: Specified cast is not valid.
at Xamarin.Forms.Platform.MacOS.RadioButtonRenderer.OnButtonActivated (System.Object sender, System.EventArgs eventArgs) [0x00006] in <8a8d612caf0944fe942d18a9ec2fe3d3>:0
at AppKit.ActionDispatcher.OnActivated (Foundation.NSObject sender) [0x00010] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.18.2.1/src/Xamarin.Mac/AppKit/ActionDispatcher.cs:50
at at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr(intptr,intptr,intptr)
at AppKit.NSControl.MouseDown (AppKit.NSEvent theEvent) [0x00040] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.18.2.1/src/Xamarin.Mac/NSControl.g.cs:465
at Xamarin.Forms.Platform.MacOS.RadioButtonRenderer+FormsNSButton.MouseDown (AppKit.NSEvent theEvent) [0x00011] in <8a8d612caf0944fe942d18a9ec2fe3d3>:0
at at (wrapper managed-to-native) AppKit.NSApplication.NSApplicationMain(int,string[])
at AppKit.NSApplication.Main (System.String[] args) [0x00040] in /Library/Frameworks/Xamarin.Mac.framework/Versions/6.18.2.1/src/Xamarin.Mac/AppKit/NSApplication.cs:109
at TestRadio.Mac.MainClass.Main (System.String[] args) [0x00017] in /Users/../Projects/TestRadioButton/TestRadio.Mac/Main.cs:11

Steps to Reproduce

  1. Launch the attached repo on Mac platform,
  2. click on the radio button.

Expected Behavior

  • Radio button needs to be checked/selected

Actual Behavior

  • Throws InvalidCastException

Basic Information

  • Version with issue: XF 5.0 pre 4, XF 5.0 pre 1
  • IDE:
  • Platform Target Frameworks:
    • Xamarin.Mac Modern
  • Nuget Packages: Xamarin.Forms 5.0.0.1709 -pre4

Reproduction Link

TestRadioButton.zip

@samhouts samhouts added this to New in Triage Nov 17, 2020
@jsuarezruiz jsuarezruiz self-assigned this Nov 17, 2020
@jsuarezruiz jsuarezruiz added e/1 🕐 1 and removed s/unverified New report that has yet to be verified labels Nov 17, 2020
@jsuarezruiz jsuarezruiz moved this from New to Ready For Work in Triage Nov 17, 2020
@jsuarezruiz jsuarezruiz added the in-progress This issue has an associated pull request that may resolve it! label Nov 18, 2020
Triage automation moved this from Ready For Work to Closed Nov 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/radiobutton 🔘 e/1 🕐 1 in-progress This issue has an associated pull request that may resolve it! p/macOS t/bug 🐛
Projects
Triage
  
Closed
Development

Successfully merging a pull request may close this issue.

2 participants