-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalArgumentException on UIKey.getKeyCode() #548
Comments
dkimitsa
added a commit
to dkimitsa/robovm
that referenced
this issue
Jan 12, 2021
… introduces EnumConstantMissingException to be used when constant is can't be marshaled into Enum value - `UIKey.getKeyCodeRaw()` is a workaround for MobiVM#548 to allow retrieve codes that are not present in `UIKeyboardHIDUsage` - `EnumConstantMissingException` extends `IllegalArgumentException` and will be thrown instead of last by `ValuedEnum` in case constant is can't be marshaled. It also contains constant value. Existing code that catches `IllegalArgumentException` will not be affected
it is not possible to fix missing valued in enum without switching from enum to raw int. |
The added method and new exception looks good to me, keeps backwards compatiblity and is a good addition. Thanks in advance! |
dkimitsa
added a commit
to dkimitsa/robovm
that referenced
this issue
Jan 20, 2021
fix for MobiVM#548 is not working as expected as produce: ``` org.robovm.compiler.CompilerException: Found multiple overridable @method or @Property methods in org.robovm.apple.uikit.UIKey with the selector 'keyCode'. ``` the fix is not to use same @Property annotation but implement getKeyCode with separate implementation that calls getKeyCodeRaw
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please ensure you have given all the following requested information in your report.
Issue details
Calling 'UIKey.getKeyCode()` can throw an IllegalArgumentException (see below).
The enum is not complete, 669 seems to be the "Globe key" on some magic keyboards.
Versions:
Please provide the version of RoboVM, XCode and JDK used
Build Targets:
arm64
Stacktrace
The text was updated successfully, but these errors were encountered: