I think you need to declare the namespace on the C# binding side. E.g. I
have a class that on the ObjC side is just AVUtils, but my C# binding to it
is an interface declared in the GoGame.iOS.AV namespace.

Haven't done this with concrete classes, though, or tried to bind anything
in a way that's accessible from IB -- I gave up on IB and started
hand-coding all my UIs after my first two or three weeks. :)

--D.

On Fri, May 20, 2011 at 10:15 AM, Michael Brian Bentley <
[email protected]> wrote:

> How do you associate a namespace with one of your classes in the Xib?
>
>
> When I am in Interface Builder adding one of my view controllers to a
> main window xib, when I save, the code that winds up in
> MainWindow.xib.designer.cs looks like:
>
>
>
> private MonoTouch.UIKit.UIWindow __mt_window;
>
> private MGSplitViewController __mt_splitViewController;
>
>
> and
>
>
> [MonoTouch.Foundation.Connect("splitViewController")]
> private MGSplitViewController splitViewController {
>  get {
>    this.__mt_splitViewController =
>      ((MGSplitViewController)(this.GetNativeField("splitViewController")));
>    return this.__mt_splitViewController;
>  }
>  set {
>    this.__mt_splitViewController = value;
>    this.SetNativeField("splitViewController", value);
>  }
> }
>
>
> On build, I get error messages for MainWindow.designer.cs. It seems
> to doubt the lineage of MGSplitViewController, I think because
> there's no relevant namespace mentioned anywhere in that file.
>
> I tried to specify MG.MGSplitViewController in the class name in the
> info inspector of Interface Builder (3.2.6) but it didn't go for it.
>
> I've included the MG bindings in a dll that is referenced by the project.
>
>
> Thanks,
>
> -Mike
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>



-- 
David Moles
[email protected]
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to