Hi,
I'd like to get a general advice on how to wire up together some components.
I have a simple utility app which uses two independent windows to interact with user. Their controllers have all the functionality for particular tasks encapsulated.
The problem with it, is that they use shared resource. A singleton of another class.
At the moment everything is just placed within default mainmenu.xib where both windows+controllers and singleton are instantiated. They are subsequently crossreferenced using IBOutlets.
It looks to me that placing everything (unrelated windows) in one resource is not a good approach in general. Are there any better approaches to resolve that?
Almost forgot, window controllers are connected to menu items as well.
I'd like to get a general advice on how to wire up together some components.
I have a simple utility app which uses two independent windows to interact with user. Their controllers have all the functionality for particular tasks encapsulated.
The problem with it, is that they use shared resource. A singleton of another class.
At the moment everything is just placed within default mainmenu.xib where both windows+controllers and singleton are instantiated. They are subsequently crossreferenced using IBOutlets.
It looks to me that placing everything (unrelated windows) in one resource is not a good approach in general. Are there any better approaches to resolve that?
Almost forgot, window controllers are connected to menu items as well.