[Mono-osx] NSSplitView with MonoMac

JohnMoshakis john at moshakis.com
Sun Jan 30 20:47:33 EST 2011


Hi,

I'm trying to use NSSplitView in an application and not really sure if I'm
doing it the right way.

I have a MainWindow and 2 views in my project.  The views are called
FirstView and SecondView

Having dropped an NSSplitView onto the MainWindow, I found that you end up
with 2 NSViews inside the NSSplitView. I can then replace the NSViews with
my views ie FirstView and SecondView by opening up all three XIBs in
interface builder and doing a bit of dragging and dropping.

If I then save in interfacebuilder the designer file
MainWindow.Xib.Designer.cs looks like this 


	// Should subclass MonoMac.AppKit.NSView
	[MonoMac.Foundation.Register("FirstView")]
	public partial class FirstView {
	}
	
	// Should subclass MonoMac.AppKit.NSWindow
	[MonoMac.Foundation.Register("MainWindow")]
	public partial class MainWindow {
	}
	
	// Should subclass MonoMac.AppKit.NSWindowController
	[MonoMac.Foundation.Register("MainWindowController")]
	public partial class MainWindowController {
		
Which wont compile because I get this

/Users/JohnMoshakis/Documents/develop/MonoMacUI/MonoMacSplitters/MainWindow.xib.designer.cs(29,29):
Error CS0579: The attribute `MonoMac.Foundation.RegisterAttribute' cannot be
applied multiple times (CS0579) (MonoMacSplitters)

I can remove the references to FirstView and SecondView myself and run the
application.

Is this a bug or something I shouldn't be doing ?

Cheers,
John
-- 
View this message in context: http://mono.1490590.n4.nabble.com/NSSplitView-with-MonoMac-tp3247970p3247970.html
Sent from the Mono - OSX mailing list archive at Nabble.com.


More information about the Mono-osx mailing list