-
Notifications
You must be signed in to change notification settings - Fork 3.2k
It is possible to register any Class as an OpMode #97
Comments
@calebsander if you have the code to solve this (anything, really), you should consider sending a Pull Request! |
The issue is that the code is contained in one of the precompiled libraries, so it isn't really possible for the general public to submit pull requests until they decide to open-source the code. |
Still an issue in 16.01.04 |
Still an issue in yesterday's release |
I would recommend removing the class-based register method in favor of the instance-based method because it makes explicit when the constructor is called. |
Perhaps something similar to how the |
Fixed in 2.0. |
Due to the use of reflection to store OpModes, trying to run a non-OpMode class as an OpMode throws some cryptic errors at runtime. It seems like this could be pretty easily solved by changing the method signature of
OpModeManager.register()
frompublic void register(String name, Class opMode)
topublic void register(String name, Class<? extends OpMode> opMode)
.The text was updated successfully, but these errors were encountered: