[Mono-osx] MonoMac project structure

thenextman rmarkiewicz at devolutions.net
Fri Nov 2 14:58:43 UTC 2012


I'm trying to move some of my application logic into a class library, rather
than the MonoMac project.

Ideally, I would like to move my AppDelegate and .xib/UI files into the
class library. I'm able to do this on MonoTouch, but can't figure out how to
do it in MonoMac. Is this possible?

For the AppDelegate:
In MT, I'm able to create a custom AppDelegate class, derived from
UIApplicationDelegate. I decorate it with the register attribute (e.g.
[Register("MyCustomDelegate")]), and then in main.cs I can do something like
this:

UIApplication.Main (args, null, "MyCustomDelegate");

Is there any way to achieve this functionality in MonoMac?

Second, can I move my UI files into a class library? I'm tried doing this,
but it seems to break my app.

For instance, double-clicking a .xib in a class library project just
displays the XML, not opens in XCode. In fact, it seems like all XCode
integration is broken. When I run my app, nothing happens - I step through
NSApplication.Main(args), but my AppDelegate is never reached. Also, it
seems like compilation is suddenly happening very quickly - is it now
'skipping' something? Is it because I've broken the XCode integration?

I'd like a hint, as to whether what I'm trying to do, is even possible.
Thank you!



--
View this message in context: http://mono.1490590.n4.nabble.com/MonoMac-project-structure-tp4657231.html
Sent from the Mono - OSX mailing list archive at Nabble.com.


More information about the Mono-osx mailing list