Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

You_Should_Not_Call_base_In_This_Method exception

$
0
0

Hi, I have a UISegmentedControl which is used to switch between the views of a UITabController which is hidden (see the code below). It was working until a few days ago. But now it throws You_Should_Not_Call_base_In_This_Method exception on the line where tabs.selectedIndex is set.

The weird part is, I didn't make any change in this implementation (the only thing I remember is updating the Xamarin version). Besides it still works in simulator but fails on device.

Is there anyone who has any clue on the issue?

Thanks in advance.

segmentControl.ValueChanged += (sender, e) => { var selectedSegmentId = (sender as UISegmentedControl).SelectedSegment;

            if(selectedSegmentId.Equals(0)){
                segmentControl.SetImage (UIImage.FromFile ("mapsinglepassive.png"), 0);
                segmentControl.SetImage (UIImage.FromFile ("listsingleactive.png"), 1);
                this.tabs.SelectedIndex = 1;
            }else {
                segmentControl.SetImage (UIImage.FromFile ("mapsingleactive.png"), 0);
                segmentControl.SetImage (UIImage.FromFile ("listsinglepassive.png"), 1);
                this.tabs.SelectedIndex = 0;
            }
        };

Exception detail:

Instance {MonoTouch.Foundation.You_Should_Not_Call_base_In_This_Method: Exception of type 'MonoTouch.Foundation.You_Should_Not_Call_base_In_This_Method' was thrown.
    at MonoTouch.MapKit.MKMapViewDelegate.RegionChanged (MonoTouch.MapKit.MKMapView mapView, Boolean animated) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/MapKit/.pp-MKMapViewDelegate.g.cs:375
    at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSendSuper_int (intptr,intptr,int)
    at MonoTouch.UIKit.UITabBarController.set_SelectedIndex (Int32 value) [0x0002b] in /Developer/MonoTouch/Source/monotouch/src/UIKit/.pp-UITabBarController.g.cs:238
    at PathiApp.HomeViewController+<ViewDidLoad>c__AnonStorey1F.<>m__30 (System.Object sender, System.EventArgs e) [0x00053] in /Users/onureren/Desktop/PathiApp/PathiApp/Screens/HomeViewController.cs:83
    at MonoTouch.UIKit.UIControlEventProxy.Activated () [0x00000] in /Developer/MonoTouch/Source/monotouch/src/UIKit/.pp-UIControl.cs:30
    at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
    at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/.pp-UIApplication.cs:38
    at PathiApp.Application.Main (System.String[] args) [0x00008] in /Users/onureren/Desktop/PathiApp/PathiApp/Main.cs:16 } MonoTouch.Foundation.You_Should_Not_Call_base_In_This_Method

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>