I am using MVC architecture in my project. And my controller sees both view and model. All my actions are in controller, so when i create controller i have method addActions() which is called by the constructor in Controller which add's all the actions to the view elements. It looks like this:
private void prepareActions()
{
view.getMenu().setHelpAboutAction(aboutTeamAction);
view.getMenu().setExitAction(exitAction);
}
But this only works for the objects in the view which are created when making view.
But problem is because i create some object's on button click. And i can't access them when creating controller when they don't exist. How do i attach these actions ?
Aucun commentaire:
Enregistrer un commentaire