views:

26

answers:

1

@ first I thought it wasn't firing, but saw this

So I waited and now I get Unhandled Exception: 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. in the failed handler.

I have defined a CLLocationManager, here is FinishedLaunching & CLLocationManagerDelegate

public override bool FinishedLaunching (UIApplication app, NSDictionary options)
            {
                // If you have defined a view, add it here:
                // window.AddSubview (navigationController.View);

                _locationManager = new CLLocationManager();
                _locationManager.Delegate = new LocationManagerDelegate(this);
                _locationManager.StartUpdatingLocation();

                window.MakeKeyAndVisible ();


                return true;
            }




private class LocationManagerDelegate : CLLocationManagerDelegate
        {
            private AppDelegate _appd;
            public LocationManagerDelegate(AppDelegate appd)
            {
               _appd = appd;
                 Console.WriteLine("Delegate created");
            }
            public override void UpdatedLocation(CLLocationManager manager
                                                    , CLLocation newLocation, CLLocation oldLocation)
            {
                Console.WriteLine("Lat: " + newLocation.Coordinate.Latitude.ToString());


            }
              public override void Failed (CLLocationManager manager, NSError error)
            {
                //_appd.labelInfo.Text = "Failed to find location";
                Console.WriteLine("Failed to find location");
                base.Failed (manager, error);
            }
        }

I am using the latest monodevelop, monotouch, xcode and iphone SDK, just installed a coupla days ago. Any suggestions?

Regards

_Eric

+1  A: 

The exception is saying you should not call base.Failed in the overridden "Failed" method.

ifwdev
Yup, thanks. Late night. Will it always fail in the sim 4.1?
Eric
I'm not sure about that. I'm still using 4.0.1
ifwdev
Just to add, it was still failing, I needed to turn airport on, even though I had a hardline
Eric