Skip to content
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

Problems with generic uiviewcontroller inheritance in 6.0.0.2 of MonoTouch #36

Closed
slodge opened this issue Oct 6, 2012 · 1 comment
Closed

Comments

@slodge
Copy link
Contributor

slodge commented Oct 6, 2012

No one has reported any errors yet, but I'm tracking this problem reported in MonoCross (thanks Ben!)


Email from Ben was:


It's true that MonoCross source code will not compile with MonoTouch 6.0.2 but will with MonoTouch 6.0.3 (currently in Beta). The compiler error occurs because of an identified bug with subclassing CocoaTouch objects with classes utilizing generics. In MonoTouch 6.0.3 the error is switched to a warning.

Generics are relied on in the MonoCross.Touch project as a convienence for implementing the IMXView interface within CocoaTouch UIView subclasses. The MonoCross.Touch classes are there as boiler plate code, and the abstract classes are entirely optional. To remove the boiler plate code from utilization simply remove the offending classes from the MonoCross.Touch project; and in your Touch container project implement the IMXView interface manually for each class which inherits from the offending boiler plate abstract classes.

... this compile error only occurs when you compile for the device, and does not appear when compiling for the simulator. Just another reason to "test early and often on your target devices". Don't rely on simulators for unit/integration testing.

NOTE: This only occurs with 6.0.2 and is fixed in MonoTouch 6.0.3 with a switch from a compiler error to a compiler warning. The warning doesn't fix the possible bug, but does provide developers an opportunity to proceed with caution. I still continue to use the boiler plate code.

Links to more info:

https://bugzilla.xamarin.com/show_bug.cgi?id=7547

http://stackoverflow.com/questions/12722285/generic-reference-type-error-monotouch

@slodge
Copy link
Contributor Author

slodge commented Oct 27, 2012

This doesn't seem to be very problematic - so closing!

@slodge slodge closed this as completed Oct 27, 2012
martijn00 pushed a commit to martijn00/MvvmCross that referenced this issue Dec 8, 2016
Updated MvvmCross-Forms project to beta8.
martijn00 pushed a commit to martijn00/MvvmCross that referenced this issue Dec 8, 2016
kjeremy pushed a commit to kjeremy/MvvmCross that referenced this issue Dec 11, 2016
martijn00 pushed a commit to martijn00/MvvmCross that referenced this issue Apr 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant