UIPopover and passing data - getting closer
===

I have set myself a simple challenge, which I see in many apps and I'm having a lot of difficulty with it.   

My task is to have one ViewController with a Navigation bar, button and a label.  When you press the button a UIPopover pops up with a new ViewController and the user presses a button inside that popover.  When they press that button my  ViewController can use that information for something. Thats it. Simple?

Therefore my parent ViewController is set up as:

    UIViewController popOverViewController = new PopOverViewController ();
    PopoverDelegate _popoverDelegate;  
  
    public override void ViewDidLoad () {
        base.ViewDidLoad ();
        BarButtonItemPopover = new UIPopoverController (popOverViewController);
        BarButtonItemPopover.PopoverContentSize = new SizeF (320, 320);
        _popoverDelegate = new PopoverDelegate();
        BarButtonItemPopover.Delegate = _popoverDelegate;
    }

    public class PopoverDelegate : UIPopoverControllerDelegate {
         public PopoverDelegate() { }

         public override void DidDismiss (UIPopoverController controller) {
               string mike = "Dismissed";
         }

         public void updateSomething(string someData) {
               // When the user clicks in my popOverViewController I want to come
               // here and do something.  I will then dismiss the popover here.
               string mike = someData;
         }
    }

My popOverViewController is set up as UIViewController, with a button on it called btnClickMe and the key bit is this:

     public override void ViewDidLoad () {
          base.ViewDidLoad ();
          this.btnClickMe.TouchUpInside += (s, e) => {
				Console.WriteLine("");
                 // When I'm clicked I want to send some 
                 // data to the updateSomething("hello world") method
                 // in the ViewController that crated me! Help!
			};
     }


I have debugged and when I dismiss the Popover in the simulator the Delegate fires and string mike in my calling ViewController does equal "Dismissed".  

What I simply cannot understand or find out is how you get the updateSomething() method to be called/referenced/fired from the popoverViewController.  I have looked at numerous examples of people using UIPopover but no-one seems to have an example of doing this in Monotouch there all in Objective C.  Does this mean it's not possible? Or is it for very experience people only? 

If I'm honest I thought it would be easier in Monotouch than Objective C as I am an experienced C# developer but at the moment I think it would be easier to learn Objective C!!

I hope someone can help me as I'm getting very confused/frustrated.

Thanks

Mike
