Reputation: 22939
I have a NSDocument
based application, which allows the user to send messages, after he has logged in.
These should be the user's steps:
CMD + N
and sends another message (without having to log in again)The message model is placed in the MyDocument.xib
. However the user model should be place in a global place (I would say MainMenu.xib).
My question is now:
MyDocument.m
Upvotes: 0
Views: 309
Reputation: 22939
I finally got it working with my NSApplication subclass (some say this is not the way to go). For this I had to change the principal class from NSApplication
to my new custom NSApplication subclass.
Upvotes: 0
Reputation: 6037
I would create an NSApplication delegate and then add you functionality in you delegate or an property of you delegate, you can then use [[NSApplicaton sharedApplicaton] delegate] to get you delegate. You application delegate is the place to associate model data that is common to you application.
Upvotes: 1