Re: Best way to share object instances between modules?
Lookup is something I have been looking at, but it doesn't look simple
to add normal objects to the lookup.
I'm now faced with the doubt of where/when can/must I put my object
instance in the lookup?
The catalog module has a class, CatalogEngine, that provides
everything I need to do with my application, it is the model in an
typical MVC structured application.
I need the Gui module to access this class. I don't know where to
instanciate it. One other problem is that I have an option to create
new catalogs, that will need to override the CatalogEngine instance
being used.
The code to create a new catalog engine is placed inside a dialog
window that is open through the menu.
So I need to know two things:
- Where should I instantiate my model and put it into a lookup?
- How can I notify other TopComponents that exist in the GUI module
and that need to display data from the model, CatalogEngine?
I think my doubts came from not understanding the platform, I would
easily implement this in a normal MVC application.
--
Sem mais e com os melhores cumprimentos,
Sérgio Lopes