有MainModel、MainView和MainController类,它们使主窗口显示客户表的内容,并允许用户插入、删除或编辑客户。
我的问题是,插入和编辑按钮应该显示一些对话框窗口,让用户插入和编辑一些文本值,我有些疑问。
我想问你一些问题:
- Should I use the MVC architecture for each dialog window?
If yes, I have tried doing it but my dialog windows are modal, so my code runs the model, runs the view but it gets blocked in the view and it doesn't run the controller class. How could I solve it?
For example here it gets blocked in the "new InsertCustomerController..." instruction:
CustomerModel customerModel = new CustomerModel(); InsertCustomerView insertCustomerView = new insertCustomerView(customerModel); new InsertCustomerController(insertCustomerView, customerModel);